FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/quick_sort.py at master · DIVYA-19/python · GitHub
DIVYA-19
/
python
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
quick_sort.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (15 loc) · 345 Bytes
Breadcrumbs
python
/
quick_sort.py
Copy path
File metadata and controls
18 lines (15 loc) · 345 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
12
13
14
15
16
17
18
data
=
[
1
,
2
,
4
,
8
,
4
,
3
,
6
,
3
]
def
QuickSort
(
data
):
if
len
(
data
)
<
1
:
return
data
pivot
=
data
[
0
]
left
=
[]
right
=
[]
for
i
in
data
[
1
:]:
if
i
<
pivot
:
left
.
append
(
i
)
else
:
right
.
append
(
i
)
return
QuickSort
(
left
)
+
[
pivot
]
+
QuickSort
(
right
)
data
=
QuickSort
(
data
)
print
(
data
)
Back
|
FazBrowse Home
|
New Git URL