Unexpected issue in java


#1

Showing failing for larger test cases.
Try submitting in leetcode, if the logic works, it will get submitted there. No need to waste time.


#2

Use Java 7, change the data type of A to List and your solution will work.

@anshumansingh please fix this.