1 question was on a greedy selection
2 was to make a tree from a given preorder and inorder traversal without any space
3 was to find a triplet given a condition a[i]<a[k]<a[j] i<j<k in a array
4.find the next permutation
5.find a smallest window in an array with maximum number of distinct number of digits