Werfen interview question

reverse binary tree in O(n) time