In Java 7, change the function parameter to accept List A instead of final int A
Java 8 test cases broken. Had to code in Java 7 to make it pass. (Even for that, function params were wrong)
Thanks buddy. It worked after changing the argument type to List.