Getting ready for technical interviews can feel like a lot, especially if you don’t know where to start. The Neetcode 150 is a popular list that many people use to sharpen their coding skills and get ...
Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between).
// https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal root.left = creator(values, root.left, 2*i+1, n); root.right = creator ...