Non Decreasing Array Leetcode Question