Talk:Sorting algorithms/Selection sort: Difference between revisions
Content added Content deleted
(Undo change that deleted all language solutions) |
m (Answered the query.) |
||
Line 10: | Line 10: | ||
Not sure what language it is... --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 11:52, 15 January 2017 (UTC) |
Not sure what language it is... --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 11:52, 15 January 2017 (UTC) |
||
: The computer programming language is: '''XPL0''' -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:25, 21 September 2018 (UTC) |
Latest revision as of 23:25, 21 September 2018
Page update of 15 January
I reverted the change by RomilAditya as they replaced the entire page with their new solution:
-module(solution). -import(lists,[delete/2,max/1]). -compile(export_all). selection_sort([],Sort)-> Sort; selection_sort(Ar,Sort)-> M=max(Ar), Ad=delete(M,Ar), selection_sort(Ad,[M|Sort]). print_array([])->ok; print_array([H|T])-> io:format("~p~n",[H]), print_array(T).
main()-> Ans=selection_sort([1,5,7,8,4,10],[]), print_array(Ans).
Not sure what language it is... --Tigerofdarkness (talk) 11:52, 15 January 2017 (UTC)
- The computer programming language is: XPL0 -- Gerard Schildberger (talk) 23:25, 21 September 2018 (UTC)