You are viewing a single comment's thread. Return to all comments →
Your solution will be O(n**2). So its complexity is n**2. Try to make it atleast logn.
Seems like cookies are disabled on this browser, please enable them to open this website
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
Your solution will be O(n**2). So its complexity is n**2. Try to make it atleast logn.