Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitab63cf5

Browse files
authored
Merge pull requestpowerexploit#3 from rcsm89/master
Create insert_sort.py
2 parents74cd41c +b497949 commitab63cf5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎Scripts/insert_sort.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
definsert_sort(_list):
2+
foriinrange(1,len(_list)):
3+
elm=_list[i]
4+
k=i
5+
whilenotk<=0and_list[k-1]>elm :
6+
_list[k]=_list[k-1]
7+
k-=1
8+
_list[k]=elm
9+
l=_list
10+
returnl

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp