题解 | #旋转数组的最小数字#
旋转数组的最小数字
http://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba
```function minNumberInRotateArray(rotateArray)
{
let [left , right] = [0 , rotateArray.length -1]
while(left < right) {
let mid = left + Math.floor((right - left) / 2)
if(rotateArray[mid] < rotateArray[right]) right = mid
else if(rotateArray[mid] > rotateArray[right]) left = mid + 1
else right--
}
return rotateArray[left]
}
module.exports = {
minNumberInRotateArray : minNumberInRotateArray
};