There is some problem with solution in Java


My logic is correct and when I check the result with debug comments, it is generating correct array. But while my algorithm’s result is compared with the expected result, it is not able to read the arrays properly, only one element is visible in each row.

This seems some problem in only Java


Even I was getting similar issue. Use java 8 Array support


use java 8 array support