summaryrefslogtreecommitdiff
path: root/quick-sort.py
diff options
context:
space:
mode:
Diffstat (limited to 'quick-sort.py')
-rwxr-xr-xquick-sort.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/quick-sort.py b/quick-sort.py
index 966d550..e048970 100755
--- a/quick-sort.py
+++ b/quick-sort.py
@@ -1,7 +1,8 @@
#!/bin/python3
-# ---------- title
-
+# ---------- Quick Sort
+# Python implementation of the quick sort algorithm
+# performed against a randomly-generated list of numbers
# ---------- Imported modules
@@ -16,7 +17,7 @@ target = sys.argv[1]
# ingress of data
numdata = io.ingressCSV(target)
-# quick sort algorithm, defined as a function (to be called recursively)
+# quick sort algorithm, defined as a function to enable recursive calling
def quickSort(data):
if(len(data)>1):
pivot = int(len(data)/2)
@@ -35,11 +36,6 @@ def quickSort(data):
# running quicksort against the ingressed data
numdata = quickSort(numdata)
-#FIXME: try using a separate list initialization if problems encountered
-#writedata = quiskSort(numdata)
-#io.egressCSV(writedata,target)
-
-
# finishing up
print("Sort complete, writing to file!")
io.egressCSV(numdata,target)