Permutations of numbers
depth first search for each element
Generate parentheses
Back tracking and depth first search, two recursive calls
Take leftside product and right side product and multiply them together.
Recursion and backtracking
Keep a stack. Push all left elements, if k is zero, return, else decrement k and go right.
4Sum II
hashtable
rotate a[i][j] = a[j][i] and then reverse the individual rows
Find duplicate element in the array
fast and slow method. However fast is basically a[a[fast]] instead of next next
Create a dict, rev dict and a min heap.