here is my approach. Its working for smaller array with all elements 1, but its not working for larger array. Please suggest modification in the code https://leetcode.com/pr