Use Java7 instead of Java8, it seems they have used Test-Cases of some other question in Java8, and in Java7 too, change the argument of the function from array to list.
Use Java7 instead of Java8, it seems they have used Test-Cases of some other question in Java8, and in Java7 too, change the argument of the function from array to list.