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

Function is_sorted

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

Source from the content-addressed store, hash-verified

12
13
14def is_sorted(a):
15 n = len(a)
16 for i in range(0, n - 1):
17 if (a[i] > a[i + 1]):
18 return False
19 return True
20
21# To generate permuatation of the array
22

Callers 1

bogo_sortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected