PFP Homework 1

From Marek Běhálek Wiki
Revision as of 11:40, 10 October 2023 by Beh01 (talk | contribs) (Created page with "= PFP Homework 1 = == Automatons == * Create a function, that sorts an array using quicksort algorithm [https://en.wikipedia.org/wiki/Quicksort <code>quicksort</code>]. Ins...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PFP Homework 1

Automatons

  • Create a function, that sorts an array using quicksort algorithm quicksort. Inside, you must use the mutable array STArray.
quickSort :: Array Int Int -> Array Int Int
ghci> elems $ quickSort $  listArray (0,5) [8,4,9,6,7,1] 
[1,4,6,7,8,9]