MCPcopy Create free account
hub / github.com/geekcomputers/Python / wave_sort.py

File wave_sort.py

Sorting Algorithms/wave_sort.py:None–None  ·  view source on GitHub ↗

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]

Callers

nothing calls this directly

Calls 1

sortInWaveFunction · 0.85

Tested by

no test coverage detected