Added code for linear and binary search