Discuss the approach that you will try, i don't understand their constraints, we can solve it in n^2 why they are providing constraints of n^3 ?