NeetCode #461LC-1609MediumTrees
← Back to All Problems

#461 · #1609 · Even Odd Tree(奇偶树)

📌 Problem Statement & Constraints

A binary tree is even-odd if: every even-indexed level (the root is level 0) has strictly increasing values that are all odd, and every odd-indexed level has strictly decreasing values that are all even. Given the root, return whether it is even-odd. Constraints: the number of nodes is in [1, 10^5], 1 <= Node.val <= 10^6.
🔒

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!