Skip to content

Commit

Permalink
Update Quick_Sort.py
Browse files Browse the repository at this point in the history
iterate through list object through iterator instead of index
  • Loading branch information
JonahYeoh authored Jul 21, 2020
1 parent 4d9802d commit 17bda61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Quick_Sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def quickSort(arr, low, high):
n = len(arr)
quickSort(arr, 0, n - 1)
print("Sorted array is:")
for i in range(n):
print("%d" % arr[i]),
for i in arr:
print("%d" % i),

0 comments on commit 17bda61

Please sign in to comment.