Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
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]
5
6
7
arr = []
Callers
1
wave_sort.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected