MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / counting_sort_string

Function counting_sort_string

sorts/counting_sort.py:59–64  ·  view source on GitHub ↗

>>> counting_sort_string("thisisthestring") 'eghhiiinrsssttt'

(string)

Source from the content-addressed store, hash-verified

57
58
59def counting_sort_string(string):
60 """
61 >>> counting_sort_string("thisisthestring")
62 'eghhiiinrsssttt'
63 """
64 return "".join([chr(i) for i in counting_sort([ord(c) for c in string])])
65
66
67if __name__ == "__main__":

Callers 1

counting_sort.pyFile · 0.85

Calls 1

counting_sortFunction · 0.85

Tested by

no test coverage detected