FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
basic-programs/python/recursion/bubblesort.py at master · Scarlet-Coder/basic-programs · GitHub
Scarlet-Coder
/
basic-programs
Public
forked from
utkarsh-shekhar/basic-programs
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
basic-programs
/
python
/
recursion
/
bubblesort.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (10 loc) · 309 Bytes
Breadcrumbs
basic-programs
/
python
/
recursion
/
bubblesort.py
Copy path
File metadata and controls
11 lines (10 loc) · 309 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
def
bubbleSort
(
alist
):
for
passnum
in
range
(
len
(
alist
)
-
1
,
0
,
-
1
):
for
i
in
range
(
passnum
):
if
alist
[
i
]
>
alist
[
i
+
1
]:
temp
=
alist
[
i
]
alist
[
i
]
=
alist
[
i
+
1
]
alist
[
i
+
1
]
=
temp
alist
=
[
54
,
26
,
93
,
17
,
77
,
31
,
44
,
55
,
20
]
bubbleSort
(
alist
)
print
(
alist
)
Back
|
FazBrowse Home
|
New Git URL