You are viewing a single comment's thread. Return to all comments →
My python sollution
def countSort(a): m_value = 0 for i in range(len(a)): if i < len(a) // 2 : a[i][1] = '-' a[i][0] = int(a[i][0]) m_value = max(m_value,a[i][0]) sort = [[] for i in range(m_value+1)] for j in range(len(a)): sort[a[j][0]].append(a[j][1]) result = [] for i in sort : result.extend(i) print(' '.join(map(str,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 →
My python sollution