Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BeeBombshell/Python-DSA
/ sortArray
Method
sortArray
Sort-all/insertion.py:3–10 ·
view source on GitHub ↗
(self, N: List[int])
Source
from the content-addressed store, hash-verified
1
2
class
Solution:
3
def
sortArray(self, N: List[int]) -> List[int]:
4
L = len(N)
5
for
i in range(1,L):
6
for
j in range(0,i):
7
if
N[i] < N[j]:
8
N.insert(j, N.pop(i))
9
break
10
return
N
Callers
nothing calls this directly
Calls
2
pop
Method · 0.80
insert
Method · 0.45
Tested by
no test coverage detected