Category: DFS
You are given two binary search trees a and b and an integer target. Return whether there’s a number in a and a number in b such that their …
Teaching Kids Programming: Videos on Data Structures and Algorithms Yesterday, we talked about the Breadth First Search Algorithm. We are solving the same Jump Game problem today by using …
Given a binary tree root, repeatedly delete all leaves that have even values. That is, if after deletions, a node becomes a leaf with an even value, it too …
Given a binary tree root, return the leftmost node’s value on each level of the tree. Constraints n ≤ 100,000 where n is the number of nodes in root …
Given a binary tree root, count and return the number of nodes where its value is greater than or equal to the values of all of its descendants. For …