Reliably Broken Sort Given a list of positive integers that contains at least 3 distinct entries, output a permutation of that list that isn't sorted in ascending or descending order.
Examples
1,2,3 -&gt; 2,1,3 or 3,1,2 or 1,3,2 or 2,3,1
1,2,3,3 -&gt; 2,1,3,3 or 3,1,2,3 or 1,3,2,3 etc..

Thanks @Arnauld and @NoOneIsHere for the title!
JavaScript (ES6), 39 34 bytes
a=&gt;[a.sort((x,y)=&gt;x-y).pop(),...a]

Sort the array in ascending order, pop the last element and use it as the first element of a new array. Then destructure the remaining elements of the original array into the new array (In JS, both sort and pop modify the original array).

Test it


o.innerText=(f=

a=&gt;[a.sort((x,y)=&gt;x-y).pop(),...a]

)(i.value=[1,2,3]);oninput=_=&gt;o.innerText=f(i.value.split`,`)
&lt;input id=i&gt;&lt;pre id=o&gt;