Rotated sorted array

searching an element in a rotated sorted array(ascending order) and return the index of it or -1

example:

rotatedSortedArr([3, 0, 1, 2], 1);
// 2


Share Comments