Hi,
I do have 2 separate questions actually:
- Problem 10.14 Version 1: “Solve the same problem when there is no next-level field. Your result should be stored in the right child field”. Does this actually means I have to destroy the tree and set the right child property of a node to the node’s right sibling?
- Problem 10.14 Version 2: “Solve the same problem for a general binary tree.”. In this case, would a BFS approach (with queue) actually be a good (the best) solution?