Is this an efficient way of finding the minimum using binary search?//Find the minimum in a sorted rotated list of numbersfunction findmin(arr, low, high){  if(low==high)    return arr[low];  if(arr[low]<arr[high])    return arr[low];  if((high-low) == 1)    return Math.min(arr[high], arr[low]);  var mid = Math.floor((low+high)/2);  //search right side  if(arr[mid] >= arr[low]){    return findmin(arr, mid+1, high);  }  else{    return findmin(arr, low, mid);  }    }var arr = [8,8,8,8,8,1];console.log(findmin(arr, 0, arr.length-1));
Finding the minimum from a sorted rotated array with duplicates
javascript;sorting;binary search