2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import Data.List (delete)
|
||||
|
||||
selSort :: (Ord a) => [a] -> [a]
|
||||
selSort [] = []
|
||||
selSort xs = let x = maximum xs in selSort (remove x xs) ++ [x]
|
||||
where remove _ [] = []
|
||||
remove a (x:xs)
|
||||
| x == a = xs
|
||||
| otherwise = x : remove a xs
|
||||
selSort xs = selSort (delete x xs) ++ [x]
|
||||
where x = maximum xs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue