Post History
APL (Dyalog APL), 61 bytes {⍵/⍨~(⊢∊⌊/,⌈/)+⌿0 1↓2⊥⍣¯1⊢0,⎕UCS⍵} Attempt This Online! APL's style of filter works very well here, since we can check for the max and min elements here: (⊢∊⌊/,⌈/) ...
#1: Initial revision
# [APL (Dyalog APL)](https://www.dyalog.com/products.htm), 61 bytes
```
{⍵/⍨~(⊢∊⌊/,⌈/)+⌿0 1↓2⊥⍣¯1⊢0,⎕UCS⍵}
````
[Attempt This Online!](https://ato.pxeger.com/run?1=m70qpTIxJz89PrEgZ8GCpaUlaboWN22rH_Vu1X_Uu6JO41HXokcdXY96uvR1HvV06GtqP-rZb6Bg-KhtstGjrqWPehcfWm8IVGOg86hvaqhzMFBfLcSQW0wK7o_aJlBkEpcb0ASFaqAAkFbX1dVVf9Td4q4AloIIKrgpqKsDBeYCKSShRGxiSVgFk7GLpuAQTsUlnoZTIh0qkwxUgyTpiEWDoxNWQWfsoi44hF1xibvhlHCHyjgD1SBJ5jsGlAfnp3ok57sUpZb4OjnlpxbnOxUnpnu45KeWQ_UEpyaDJFOLgeKpyLpRJVAVAxVyQRIKLNUBAA)
APL's style of filter works very well here, since we can check for the max and min elements here:
```
(⊢∊⌊/,⌈/)
```
and filter using the boolean mask later:
```
⍵/⍨~
```
