Variant of BST Level Order Traversal
Asked at Meta · Coding & Leetcode-style Questions · Difficulty: Medium
Given a binary search tree (BST), implement a variant of level order traversal. The requirement is to reverse the order of nodes in every alternate level. For example, the first level is from left to right, the second level is from right to left, the third level is left to right again, and so on.
Loading the problem…
More Meta interview questions
- LLM conceptual questions
- Implement a Two-Hidden-Layer MLP with Backpropagation in NumPy
- Dot Product with Run-Length Encoded Vectors
- Count Lakes Wrapped by a Given Island
- Minimum Remove to Make Valid Parentheses
- LLM with Beam Search and Nucleus Sampling (Meta MSL)