Given a collection of distinct numbers, return all possible permutations. For example, have the following permutations: , , , , , and . Recursive Permutation Algorithm At position 1, …
Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). For example: 3 / \ 9 20 / …
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, …
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most …
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. …