We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Thanks for the great idea!I wrote a solution with it and solved the problem ( unfortunately after I unlocked the editorial :D ).
I want to ask you is there any way to compute the final answer in
way faster than N^2. Because it is easy to divide the sequence into 2 sets, but the computing of the answer bottlenecks the algorithm.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Fair Cut
You are viewing a single comment's thread. Return to all comments →
Thanks for the great idea!I wrote a solution with it and solved the problem ( unfortunately after I unlocked the editorial :D ).
I want to ask you is there any way to compute the final answer in way faster than N^2. Because it is easy to divide the sequence into 2 sets, but the computing of the answer bottlenecks the algorithm.