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.
Independently, here is my Python3 code, which is similar but has no execution time wasted in if statements. In modern HackerRank, the inputs are already taken in the main method, and we fill-in the given method. In GeoMatt22's simplification of abehjat's C-to-Python code, the sorting according to key was excluded accidentally and str is a reserved word, meaning the suggested code is untested? This sorting challenge does not involve a counting sort, as the string values are not repeated from a small fixed list of possibilities.
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
Independently, here is my Python3 code, which is similar but has no execution time wasted in
if
statements. In modern HackerRank, the inputs are already taken in the main method, and we fill-in the given method. In GeoMatt22's simplification of abehjat's C-to-Python code, the sorting according to key was excluded accidentally andstr
is a reserved word, meaning the suggested code is untested? This sorting challenge does not involve a counting sort, as the string values are not repeated from a small fixed list of possibilities.