• + 1 comment

    why the code below code failed for the max values in some testcases. (But max = Math.max(max, sum); worked)

    int max=0; if(sum

    System.out.println(max);