Sale
Summer Offer: $190/yr $99/yr
00 : 00 : 00 : 00
Get this deal
Backend Engineering Mid-Level programming

LeetCode #107 - Binary Tree Level Order Traversal II: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from leaves to root). For example, given binary tree [3,9,20,null,null,15,7], return [[15,7],[9,20],[3]].


Input:
[3, 9, 20, null, null, 15, 7]
Output:
[[15,7],[9,20],[3]]
Constraints:
  • The number of nodes in the tree is in the range [0, 2000].

  • -1000 <= Node.val <= 1000.
Suggested Answer

Trusted by 100+ professionals preparing for interviews

Trusted by 100+ professionals 50+ Company Question Banks 5+ Supported Languages

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code runner, and AI-powered walkthroughs.

Get Started Free

More Backend Engineering Interview Prep

Describe how you would design a system to handle user authentication in a web application. What components would you include, and how would you ensure security?
Backend Engineering · Mid-Level
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Link copied to clipboard