MCPcopy Create free account
hub / github.com/geekcomputers/Python / sortInWave

Function sortInWave

Sorting Algorithms/wave_sort.py:1–4  ·  view source on GitHub ↗
(arr, n)

Source from the content-addressed store, hash-verified

1def sortInWave(arr, n):
2 arr.sort()
3 for i in range(0, n - 1, 2):
4 arr[i], arr[i + 1] = arr[i + 1], arr[i]
5
6
7arr = []

Callers 1

wave_sort.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected