Remove duplicate counting sort (#376)

This commit is contained in:
camilne
2018-10-02 03:36:24 -06:00
committed by Anshul
parent 38dbaef5f5
commit 0e76ee9076
2 changed files with 6 additions and 42 deletions

View File

@ -57,8 +57,14 @@ def counting_sort(collection):
return ordered
def counting_sort_string(string):
return ''.join([chr(i) for i in counting_sort([ord(c) for c in string])])
if __name__ == '__main__':
# Test string sort
assert "eghhiiinrsssttt" == counting_sort_string("thisisthestring")
try:
raw_input # Python 2
except NameError: