Problem 2415 · Medium

Reverse Odd Levels of Binary Tree

Reverse the node values on every odd level of a perfect binary tree, working on each level as a contiguous slice.

Open the interactive visualisation