You are viewing a single comment's thread. Return to all comments →
It fails in some cases for ex: when N=1000 :P. PS: adding if(pivot%3!=0) pivot=getPivot(pivot); before checking for if(pivot<0) solves the prolem.
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and The Beast
You are viewing a single comment's thread. Return to all comments →
It fails in some cases for ex: when N=1000 :P. PS: adding if(pivot%3!=0) pivot=getPivot(pivot); before checking for if(pivot<0) solves the prolem.