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.
I did the same approach (binary search for insertion) and in the sample test case got 0.0028535 total execution time for runningmedian method and no TLE of any submission tests, so It might be created for heaps, but binary search is also a great solution i think.
Cookie support is required to access HackerRank
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 →
I did the same approach (binary search for insertion) and in the sample test case got 0.0028535 total execution time for runningmedian method and no TLE of any submission tests, so It might be created for heaps, but binary search is also a great solution i think.