You are viewing a single comment's thread. Return to all comments →
Don't call sum() every time Oo You add only one square each time ! (reduction cost log(n) computation) → O(nlog(n)) It's possible in O(n) complexity
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →
Don't call sum() every time Oo You add only one square each time ! (reduction cost log(n) computation) → O(nlog(n)) It's possible in O(n) complexity