1) Given a string of alphabets containing spaces(may be multiple), write a code to remove the spaces. (if u solve it properly then they will add more constraints and ask u to improve the algorithm).
2) given a number in binary form, find the next biggest number having the same number of bits set.
3) Find the closest ancestor of two nodes in a tree.
4) write code to find all permutations of string.