NeetCode #426LC-2415MediumTrees
← Back to All Problems#426 · #2415 · Reverse Odd Levels of Binary Tree(反转二叉树的奇数层)
📌 Problem Statement & Constraints
Given the root of a perfect binary tree, reverse the node values at each odd level (the root is level 0). Return the root. Constraints: the number of nodes is in
[1, 2^14 - 1], 1 <= Node.val <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!