MCPcopy Create free account
hub / github.com/BeeBombshell/Python-DSA / shuffle

Function shuffle

Sorting Algorithms/bogosort.py:24–28  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

22
23
24def shuffle(a):
25 n = len(a)
26 for i in range(0, n):
27 r = random.randint(0, n - 1)
28 a[i], a[r] = a[r], a[i]
29
30
31# Driver code to test above

Callers 1

bogo_sortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected