Skip to content

Commit

Permalink
Removed quick_sort.py beeing duplicate of QuickSort.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NickTheBit committed Oct 19, 2019
1 parent 9dc21cf commit 35b79e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
24 changes: 13 additions & 11 deletions Quick_Sort.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Python program for implementation of Quicksort Sort
# Python program for implementation of Quicksort Sort

# This function takes last element as pivot, places
# the pivot element at its correct position in sorted
# array, and places all smaller (smaller than pivot)
# to left of pivot and all greater elements to right
# of pivot


# This function takes last element as pivot, places
# the pivot element at its correct position in sorted
# array, and places all smaller (smaller than pivot)
# to left of pivot and all greater elements to right
# of pivot
def partition(arr, low, high):
i = (low - 1) # index of smaller element
pivot = arr[high] # pivot
Expand All @@ -22,12 +24,12 @@ def partition(arr, low, high):
return (i + 1)


# The main function that implements QuickSort
# arr[] --> Array to be sorted,
# low --> Starting index,
# high --> Ending index
# The main function that implements QuickSort
# arr[] --> Array to be sorted,
# low --> Starting index,
# high --> Ending index

# Function to do Quick sort
# Function to do Quick sort
def quickSort(arr, low, high):
if low < high:
# pi is partitioning index, arr[p] is now
Expand Down
22 changes: 0 additions & 22 deletions quick_sort.py

This file was deleted.

0 comments on commit 35b79e7

Please sign in to comment.