Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2415. Reverse Odd Levels of Binary Tree
Given a perfect binary tree, reverse the node values at every odd-numbered level (1, 3, 5, ...) so that the sequence of values on each odd level is reversed, and return the modified tree. The perfect-tree property lets you pair symmetric nodes across each level and swap their values in-place.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.