Current version

Aug 13, 2017 20:00
posted on August 13, 2017 by flawr

Given a list of at least three distinct positive integers, output a permutation of that list that isn't sorted in ascending or decending order. Examples 1,2,3 -> 2,1,3 or 3,1,2 1,2,3,3 -> 2,1,3,3 or 3,1,2,3 or 1,3,2,3 etc..


Message history

Aug 13, 2017 20:00
said: https://codegolf.stackexchange.com/questions/138840/notsort Recent Questions - Programming Puzzles & Code Golf Stack Exchange notsort​ ​ ​ ​ ​ ​ ​ ​ ​ flawr 1502654067 Given a list of at least three distinct positive integers, output a permutation of that list that isn't sorted in ascending or decending order. Examples 1,2,3 -> 2,1,3 or 3,1,2 1,2,3,3 -> 2,1,3,3 or 3,1,2,3 or 1,3,2,3 etc..