A question has arisen on an old exam paper used for revision which asks about a type of sorting that I cannot find the name of anywhere. Hopefully somebody here can help, please?
b. Produce an algorithm which will sort an array so that the largest items are on the ends and the smallest in the middle. For example: [2,6,5,9,12] might become [12,6,2,5,9]