list = [], list = empty list, for i in range(5):, REPEAT 5 times, list.append(int(input("Enter some numbers: "))), append to list(INPUT("Enter some numbers: ")), size = len(list), size = length(list), hole = 0, hole = 0, insertion = 0, insertion = 0, for i in range(size-1):, REPEAT size-1 times, insertion = list[i], insertion = list[index i], hole = i, hole = i, while hole > 0 and list[hole - 1] > insertion:, while hole > 0 AND list[index hole-1] > insertion then, list[hole], list[hole - 1] = list[hole - 1], list[hole], SWAP list[hole], list[hole - 1], hole = hole-1, INCREMENT hole -1, list[hole] = insertion, list[index hole] = insertion, print("Sorted list:", list), OUTPUT(sorted list)
0%
Insertion sort
Share
Share
by
40425089
I-edit ang Content
Save
Like
I-Print kini
Embed
Uban pa
Assignments
Leaderboard
Show more
Show less
Kini nga leaderboard naka-pribado. Pag-klik sa
Share
aron himuon kini nga publiko.
Kini nga leaderboard gi-disable sa tag-iya sa resource.
Kini nga leaderboard gi-disable tungod ang imong mga kapilian lahi ra sa tag-iya sa resource.
I-revert ang mga Kapilian
Ang
Match up
usa ka open-ended nga template. Dili kini makamugna ug mga marka sa leaderboard.
Kinahanglan mag log in
Visual style
Fonts
Subscription required
Mga Option
I-switch ang template
Ipakita tanan
Open results
Copy link
QR code
Mag-delete
I-restore ang gi-autosave:
?