42 votes

What are the five most powerful characters in your language?

Python3, 21 27 values Characters: 3479% Unique numbers: [1,2,3,4,5,6,7,8,9,11,12,19,20,21,24,29,34,35,36,37,39,43,46,47,49,73,74]...
Yytsi's user avatar
  • 3,762
34 votes

What are the five most powerful characters in your language?

Python, 18 numbers 237#- Produces as valid results: 1, 2, 3, 4, 5, 7, 16, 23, 24, 25, 27, 32, 35, 37, 69, 71, 72, 73 EDIT: ...
Leo's user avatar
  • 12.4k
34 votes

What are the five most powerful characters in your language?

05AB1E, 27 38 41 numbers 4·>Ìn Generates the unique numbers: ...
Emigna's user avatar
  • 52.9k
33 votes

Golf bit weaving

Python 2.7, 44 -> 36 bytes lambda x:x/4&42|x*2&128|x*4&84|x/2&1
Arfie's user avatar
  • 1,241
32 votes

Greater than less than greater than something fishy

Retina, 20 bytes Byte count assumes ISO 8859-1 encoding. $.' S`> %O#`\d+ ¶ > Try it online! (The first line enables a linefeed-separated test-suite.) ...
Martin Ender's user avatar
31 votes

Anaglot Polygrams

34 Languages, 19 bytes, Score: 38,832,018,459,912,437,760,000 Here is a quick answer I threw together to show that it is possible to get an answer scoring better than 1. ...
Wheat Wizard's user avatar
  • 96.5k
31 votes

Golf an Anagram Quine

Pyth, 2 bytes )( Outputs () Try it online! ...
Rod's user avatar
  • 18.4k
27 votes

Greater than less than greater than something fishy

><>, 46 43 35 + 4 for  -s= = 39 bytes 0&l?!v:3%?\&:n1+$o! +nf0.>&n; >l&:@ This is an ...
Aaron's user avatar
  • 3,819
25 votes

Greater than less than greater than something fishy

><>, 26 + 4 = 30 bytes l22pirv 1+$2po>:3%::2g:n$- Try it online! +4 bytes for the -s= flag - if just ...
Sp3000's user avatar
  • 61.7k
24 votes

What are the five most powerful characters in your language?

Java 8, 2 4 numbers n->12 // returns 12 n->21 // returns 21 n1->2 // returns 2 n2->1 // returns 1 Weren't expecting a Java answer, were you? This ...
Xanderhall's user avatar
  • 1,296
23 votes

Alphabetically permute a string

Jelly, 5 bytes ṢŒ!QY Try it online! Explanation ...
Luis Mendo's user avatar
  • 104k
23 votes

Levi-Civita symbol

Jelly, 5 bytes ṁ4IṠS Try it online! Algorithm Let's consider the differences j-i, k-j, i-k. If (i, j, k) is a rotation of (1, 2, 3), the differences are a ...
Dennis's user avatar
  • 210k
21 votes

Hidden Inversions (Robbers' Thread)

Python 3, 46 bytes, Lynn lambda x0223334566789:(x0223334566789*89)//178
G B's user avatar
  • 21.3k
21 votes
Accepted

Ethan Finds the Maximum Element

APL (Dyalog Unicode), 5 3 bytes ⍳⊥× Try it online! Adám gave me an inspiration to golf this further. How it works ...
Bubbler's user avatar
  • 73.8k
20 votes
Accepted

The Combinatorics of Transistor

CJam (56 bytes) q~4@:Nm*:$_&{:+1$\-N),&},f{1$1$:+-\0-:(_e`0f=+++:m!:/}:+ Online demo This is an optimised version of the reference implementation I ...
Peter Taylor's user avatar
  • 43.1k
20 votes

Deranged !Combinatorics: Compute the Subfactorial

Funciton, 336 bytes Byte count assumes UTF-16 encoding with BOM. ...
Martin Ender's user avatar
20 votes

Output an Anagram! No Not That One!

Python 3, 64 bytes lambda a:[*{*permutations(a[0])}-{*a}][0] from itertools import* Try it online!
Mr. Xcoder's user avatar
  • 42.3k
19 votes

Faro shuffle an array

vim, 62 59 54 qrma50%mb:norm@q<cr>ggqOjdd'apjma'b@q<esc>0"qDJ<C-a>D@"i@r<esc>xxdd@" Wow. This is possibly the hackiest thing I've written ...
Doorknob's user avatar
  • 71.4k
19 votes

Antsy permutations

Pyth, 7 bytes /y+_QQS Try it online. (Only small test cases are included due to exponential run-time.) Outputs 2 for Truthy, 0 for Falsey. ...
xnor's user avatar
  • 144k
19 votes

Counting from 1 to n without any consecutive numbers

Mathematica, 58 bytes, polynomial(n) time Abs[Sum[(k-1)Hypergeometric2F1[k,k-#,2,2](#-k)!,{k,#}]-1]& How it works Rather than iterating over permutations ...
Anders Kaseorg's user avatar
19 votes

Ethan Finds the Maximum Element

Jelly, 6 bytes RU×\S: Try it online! Let's analyze under which scenarios this algorithm works. If the maximum element is at the end of the list, this obviously ...
hyper-neutrino's user avatar
  • 41.3k
17 votes

Code-Golf: Permutations

Python, 52 Input is a set. Output is a list of lists. f=lambda a:[p+[x]for x in a for p in f(a-{x})]or[[]] This is shorter than the answer that does all the work ...
feersum's user avatar
  • 31.3k
17 votes

The Permutation Pigeon-hole Principle

Brachylog, 21 bytes :1fz:da|,[] :2a#d :Am Try it online! Try it online! Predicate 0 (main predicate) ...
Leaky Nun's user avatar
  • 49.6k
17 votes

Sheffle tho vawols ureund!

R, 92 91 Can't comment yet so I'm adding my own answer albeit very similar to @Andreï Kostyrka answer (believe it or not but came up with it independently). ...
Billywob's user avatar
  • 3,493
17 votes
Accepted

Find a binary needle in a decimal haystack

05AB1E, 10 8 bytes Takes the needle in binary to save 1 byte. -2 bytes thanks to Emigna œJÙʒbŒIå Try it online! ...
kalsowerus's user avatar
  • 2,014
16 votes
Accepted

Random array without repetition

Dyalog APL, 1 byte ? Just a builtin. Try it here.
lirtosiast's user avatar
  • 21.4k
16 votes

Greater than less than greater than something fishy

CJam, 16 bytes l_,),.\'</Wf%'<* Try it online! A port of my Retina answer. Explanation ...
Martin Ender's user avatar
16 votes

Prime factors buddies

PowerShell v3+, 450 bytes ...
AdmBorkBork's user avatar
  • 43.3k
16 votes

What are the five most powerful characters in your language?

Brachylog, 26 numbers 3+*^- This outputs the following numbers: ...
Fatalize's user avatar
  • 38.4k

Only top scored, non community-wiki answers of a minimum length are eligible