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.
The way Hackerrank is ranking in this problem seems fundamentally flawed.
I wrote my answer fully in C writing a the sort algorithm myself and I got a few 'timeouts' when submitting the answer because it was not fast enough. I could have tried to make my sort faster with a quicksort of something but just rewrote the code in java and use the Arrays.sort() and just flew through. A few thoughts:
Unless Hackerack has specific timer benchmarks for every language provided that are precisely tuned for every language this problem will rank the answer different for every language or sort implementation.
I think bare C lacks a standard sort library, so to solve this problem one has to roll their own which can quickly turn into some testcases timing out. The difficulty of solving this in C could be substantially greater than in other languages.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Max Min
You are viewing a single comment's thread. Return to all comments →
New to hackerrank.
The way Hackerrank is ranking in this problem seems fundamentally flawed.
I wrote my answer fully in C writing a the sort algorithm myself and I got a few 'timeouts' when submitting the answer because it was not fast enough. I could have tried to make my sort faster with a quicksort of something but just rewrote the code in java and use the Arrays.sort() and just flew through. A few thoughts:
Unless Hackerack has specific timer benchmarks for every language provided that are precisely tuned for every language this problem will rank the answer different for every language or sort implementation.
I think bare C lacks a standard sort library, so to solve this problem one has to roll their own which can quickly turn into some testcases timing out. The difficulty of solving this in C could be substantially greater than in other languages.