Skip to content

Commit d5eda0e

Browse files
authored
Update Exercise_2.py
1 parent 5bc3430 commit d5eda0e

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Exercise_2.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1+
# Python program for implementation of Quicksort Sort
2+
3+
# give you explanation for the approach
4+
def partition(arr,low,high):
5+
6+
7+
#write your code here
8+
19

10+
# Function to do Quick sort
11+
def quickSort(arr,low,high):
12+
13+
#write your code here
14+
15+
# Driver code to test above
16+
arr = [10, 7, 8, 9, 1, 5]
17+
n = len(arr)
18+
quickSort(arr,0,n-1)
19+
print ("Sorted array is:")
20+
for i in range(n):
21+
print ("%d" %arr[i]),
22+
23+

0 commit comments

Comments
 (0)