You are viewing a single comment's thread. Return to all comments →
you cant solve the problem using Insertion sort in the given time constraints .
Heap didnt striked me at first , i actually used binary search for insertion rather than insertion sort. Got TLE in only 4 test cases .
But still the problem is designed to use Heap . so "if I want to use insertion sort method only, no heaps." this is not a healthy attitude .
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Running Median
You are viewing a single comment's thread. Return to all comments →
you cant solve the problem using Insertion sort in the given time constraints .
Heap didnt striked me at first , i actually used binary search for insertion rather than insertion sort. Got TLE in only 4 test cases .
But still the problem is designed to use Heap . so "if I want to use insertion sort method only, no heaps." this is not a healthy attitude .