Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
LinearSearch.py
#python 3.5.2 #bubbleSort(list) def bubbleSort(list): i=0 while i<len(list)-1: j=0 while j<len(list)-1-i: if list[j]>list[j+1]: list[j+1],list[j]=list[j],list[j+1] j+=1 i+=1 print(list) bubbleSort([50,40,30,20,10]) bubbleSort([40,30,20,10]) bubbleSort([50,4210,3021,-2012,10345,0,-90,4567])
run
|
edit
|
history
|
help
0
Select fruits
sensi cod
8
sept
75
Test
Lesson 5
Game4
func mast
Regular falsi