You are viewing a single comment's thread. Return to all comments →
def countSort(arr): # Write your code here temp_arr = [[] for i in range(100)] n = len(arr) for i, (num, val) in enumerate(arr): new_val = "-" if i < (n // 2) else val temp_arr[num].append(new_val) result = [] for i in temp_arr: result.extend(i) print(" ".join(result))
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 →