Problem in java lang


No matter what you do ur code in java won’t get accepted. no editorial for java 8(oracle) and even the editorial for Java (Array) support is giving TLE. So if their own solution is giving TLE then its better you just find a O(n) solution and move to next question.


Try submitting in Java-7, worked for me in case of O(n) solution