Sorted And Rotated Minimum Leetcode Javascript Question