⍝ data:
r←' according to research it doesn''t matter what order the letters in a word are the human mind can still read it the only important thing is that the first and the last letters are in the right place'
⍝ shortest:
∊{' ',⍵[∪(1,⊢,⍨?⍨)≢⍵]}¨' '(≠⊆⊢)x
⍝ fastest:
∇ x←ab2 x;n;p;b;S;r
r←n?n←⍴p←b/b>¯1⌽b←S∧(1⌽S)∧¯1⌽S←' '≠x
(b/x)←(b/x)[⍋r+n×+\p]
∇