O(N^3) solution can pass all test cases even though O(N^2) is possible


#1

When you code O(N^2) solution be careful about the memory.