You are viewing a single comment's thread. Return to all comments →
The test#1 expects to print the numbers with 0 appearances but the other test cases doesn't. I think this is a very missleading test.
This is how I workaround it with Python3:
k = int(input()) results = [0]*k for i in input().split(' '): results[int(i)] += 1 if k != 100: print(' '.join([repr(num) for num in results if num])) else: print(' '.join([repr(num) for num in results]))
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
The test#1 expects to print the numbers with 0 appearances but the other test cases doesn't. I think this is a very missleading test.
This is how I workaround it with Python3: