Implement some algorithms to sort lists.
Define a function isort :: [Int] -> [Int] that implements insertion sort using the previous function.
Define a function ssort :: [Int] -> [Int] that implements selection sort using the previous function.
Define a function msort :: [Int] -> [Int] that implements merge sort using the previous function.
Scoring
Each sorting algorithm scores 20 points.
Input
insert [10,20,30,40] 25 insert [10,20,30,40] 20 isort [6,5,2,5,6,8] remove [6,4,3,5,2,3] 2 remove [6,4,3,5,2,3] 6 ssort [6,5,2,5,6,8] merge [1,2,5,7,8] [2,4,7,9] msort [6,5,2,5,6,8] qsort [6,5,2,5,6,8] genQsort [5.0,3.0,2.5] genQsort ["jordi", "albert", "josep"] genQsort "antaviana"
Output
[10,20,25,30,40] [10,20,20,30,40] [2,5,5,6,6,8] [6,4,3,5,3] [4,3,5,2,3] [2,5,5,6,6,8] [1,2,2,4,5,7,7,8,9] [2,5,5,6,6,8] [2,5,5,6,6,8] [2.5,3.0,5.0] ["albert","jordi","josep"] "aaaainntv"