Skip to content

Commit

Permalink
Mergesort fixed name
Browse files Browse the repository at this point in the history
  • Loading branch information
firephil committed Mar 17, 2021
1 parent 4400091 commit 43bda41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Quicksort.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ qsort (x:xs) = qsort ys ++ x : qsort zs

quicksort :: [Int] -> [Int]
quicksort [] = []
quicksort list = quicksort left ++ pivotlist ++ quicksort right
quicksort list = quicksort left ++ pivot_list ++ quicksort right
where
pivot = head list
pivotlist = filter( == pivot) list
pivot_list = filter( == pivot) list
left = filter(< pivot) list
right = filter(> pivot) list

0 comments on commit 43bda41

Please sign in to comment.