2
* @param {number[]} nums5
var findMin = function (nums) {8
let r = nums.length - 1;10
const m = Math.floor((l + r) / 2);12
// Eliminate dupes ......................... only difference from #15313
while (l < m && nums[l] === nums[m]) l++;14
while (r > m && nums[r] === nums[m]) r--;15
// .........................................17
// locate the sorted side, the opposite side has the break point18
// min should be on the side that has the break point, so continue search on that side19
if (nums[l] <= nums[m]) {20
// left side is sorted (or l & m are the same index)21
// brake is on right side22
min = Math.min(min, nums[l]);25
// right side is sorted26
// break is on left side27
min = Math.min(min, nums[m]);