You are viewing a single comment's thread. Return to all comments →
Python best solution If you’re looking for solutions to the 3-month preparation kit in either Python or Rust, you can find them below: my solutions
def full_counting_sort(arr): #Time complexity: O(n) #Space complexity (ignoring input): O(1) sorted_array = [""]*101 for index in range(0, len(arr)): sorted_index = int(arr[index][0]) if index < len(arr)/2: sorted_array[sorted_index] += " -" else: sorted_array[sorted_index] += " " for letter in arr[index][1]: sorted_array[sorted_index] += letter result_string = "" for string in sorted_array: result_string += string print(result_string[1:])
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
Python best solution
If you’re looking for solutions to the 3-month preparation kit in either Python or Rust, you can find them below: my solutions