Quicksort In Haskell

[Solved] Quicksort In Haskell | Haskell - Code Explorer | yomemimo.com
Question : quicksort in haskell

Answered by : fine-flamingo-uw1y5hp8vw22

quicksort :: Ord a => [a] -> [a]
quicksort [] = []
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = filter (< p) xs greater = filter (>= p) xs

Source : https://wiki.haskell.org/Introduction#Quicksort_in_Haskell | Last Update : Sun, 05 Jul 20

Question : haskell quicksort

Answered by : testy-toad-cct2xkdbt6ay

qsort [] = []
qsort (x:xs) = qsort [y | y <- xs, y < x] ++ [x] ++ qsort [y | y <- xs, y >= x]

Source : http://rosettacode.org/wiki/Sorting_algorithms/Quicksort#Haskell | Last Update : Tue, 07 Jun 22

Answers related to quicksort in haskell

Code Explorer Popular Question For Haskell