You are viewing a single comment's thread. Return to all comments →
Great logic. But since N can go upto 100000, in worst-case(i.e all elements in ascending order) it requires 100000 creation of stack objects.
Seems like cookies are disabled on this browser, please enable them to open this website
Poisonous Plants
You are viewing a single comment's thread. Return to all comments →
Great logic. But since N can go upto 100000, in worst-case(i.e all elements in ascending order) it requires 100000 creation of stack objects.