New answers tagged permutations
0
votes
Faro shuffle an array
J-uby, 45 bytes
Takes curried arguments like F[n][array].
:**&(:zip|:flatten)%[:take,:drop]%(:+@|~:/&2)
Try it online!
0
votes
Faro shuffle an array
Tcl, 136 bytes
proc P n\ L {time {lmap a [lrange $L 0 [set h [expr [llength $L]/2]]-1] b [lrange $L $h e] {lappend K $a $b}
set L $K
unset K} $n
set L}
Try it ...
1
vote
0
votes
Number of string permutations that are palindromes
Vyxal 3, 5 bytes
⑴/⇄⧖∑
Vyxal It Online!
...
Top 50 recent answers are included
Related Tags
permutations × 216code-golf × 185
combinatorics × 43
string × 37
math × 28
sequence × 22
array × 21
number × 18
code-challenge × 15
decision-problem × 12
random × 12
sorting × 11
cops-and-robbers × 10
quine × 9
fastest-code × 8
integer × 6
source-layout × 6
abstract-algebra × 6
number-theory × 5
game × 5
restricted-complexity × 5
primes × 4
graph-theory × 4
counting × 4
open-ended-function × 4