Category: DFS
A string S represents a list of words. Each letter in the word has 1 or more options. If there is one option, the letter is represented as is. …
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer …
You have a set of tiles, where each tile has one letter tiles printed on it. Return the number of possible non-empty sequences of letters you can make. Example …
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in (R >= L). You …
Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children respectively will be at …