You are viewing a single comment's thread. Return to all comments →
Awesome code though. slight improvisation in output part.
n=int(input()) d={} maxnum=0 for i in range(n): num,str_=map(str,input().split()) num=int(num) if i<n/2: str_='-' if num>maxnum: maxnum=num if num in d: d[num].append(str_) else: d[num]=[str_] for i in range(maxnum+1): print(' '.join(d[i]),end=' ')
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 →
Awesome code though. slight improvisation in output part.