Lower Bound Question Leetcode Javascript