You are viewing a single comment's thread. Return to all comments →
Thanks. The solution worked for me but my code is getting timed out for certain test cases. The complexity is O(N^2). Any suggestions? Link - https://www.hackerrank.com/challenges/equal/submissions/code/19605416
Make  diff of size [n]  rather than [n][n].