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.
Even the Problem Setter's code times out on the tests on submissions for this problem. (It is posted in the Editorial for the problem -- try it!)
It seems to me that tests should determine whether the submitter has come up with an algorithm with the desired O(n log n) bound, while allowing a generous enough constant factor in the running time to allow the submitter to make reasonable implementation decisions. These include choice of language and other implementation choices, discussed at length in the postings, that people had to change in order to get their submissions to avoid timing out. This problem is easy to fix, by checking whether the submission runs in some reasonable multiple of the time taken by the problem tester's code. The problem tester's code, which is in Java, also appears in the editorial section for this problem.
This is a minor suggestion for improving what I regard as a fantastic site.
Thanks,
Ross McConnell,
Associate Professor of Computer Science,
Colorado State University,
Ross.McConnell@colostate.edu
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Insertion Sort Advanced Analysis
You are viewing a single comment's thread. Return to all comments →
Even the Problem Setter's code times out on the tests on submissions for this problem. (It is posted in the Editorial for the problem -- try it!)
It seems to me that tests should determine whether the submitter has come up with an algorithm with the desired O(n log n) bound, while allowing a generous enough constant factor in the running time to allow the submitter to make reasonable implementation decisions. These include choice of language and other implementation choices, discussed at length in the postings, that people had to change in order to get their submissions to avoid timing out. This problem is easy to fix, by checking whether the submission runs in some reasonable multiple of the time taken by the problem tester's code. The problem tester's code, which is in Java, also appears in the editorial section for this problem.
This is a minor suggestion for improving what I regard as a fantastic site.
Thanks, Ross McConnell, Associate Professor of Computer Science, Colorado State University, Ross.McConnell@colostate.edu