Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
def
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
sortInWave
Function · 0.85
Tested by
no test coverage detected