You are viewing a single comment's thread. Return to all comments →
I agree! This question was ambiguous.
"Given a tree and a integer, K, we have to swap the subtrees of all the nodes who are at depth h, where h ∈ [K, 2K, 3K,...]."
This part was kind of confusing because I associated h with being the height. Also, I didn't quite understand the mathematical notation h ∈ [K, 2K, 3K,...] meant to swap nodes at every depth that was a multiple of K until I looked it up. If that was explained, it would have been a lot less confusing.
Thanks for explaining the multiples of every depth. The problem description and examples do not make it very clear at all.