Tag: binary tree algorithms
You are given an integer k and a binary search tree root, where each node is either a leaf or contains 2 children. Find the node containing the value …
Given the root to a binary tree root, return a list of two numbers where the first number is the number of leaves in the tree and the second …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary search tree root, an integer lo, and another an integer hi, remove all nodes that are not …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with …
Teaching Kids Programming: Videos on Data Structures and Algorithms This problem was inspired by this original tweet by Max Howell: Google: 90% of our engineers use the software you …