Category: DFS
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 …
Given a binary tree root, return the sum of the longest path from the root to a leaf node. If there are two equally long paths, return the larger …
You are given a list blocks where each block contains two integers where start < end. You can join two blocks if the end of one is equal to …