Lower Bound Question Leetcode Javascript Interview