Tag: depth first search algorithm
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, return whether all leaves are at the same level. Constraints n ≤ 100,000 where n …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, return whether all leaves are at the same level. Constraints n ≤ 100,000 where n …
A number is called stepping number if all adjacent digits have an absolute difference of 1. For example, 321 is a stepping number while 421 is not. Given an …
Given a binary search tree root containing unique values, and an integer t, return the value of the inorder successor of t. That is, return the smallest value greater …
Given a string digits containing 2 to 9 inclusive, return in sorted lexicographic order all possible strings it could represent when mapping to letters on a phone dialpad. These …