added solutions to binary search and permutation