# Tag Info

### Smallest Bit Rotation

Charcoal, 18 bytes ≔⍘Ｎ²θＩ⍘⌊Ｅθ⭆θ§θ⁺κμ² Try it online! Link is to verbose version of code. Explanation: ≔⍘Ｎ²θ Convert the input ...
• 153k

### Smallest Bit Rotation

Retina 0.8.2, 55 bytes .+ $* +r\1(1+) 0$1 10 1 . $&$'$¶ 1 10 +01 110 O \G1 Try it online! Explanation: .+$* Convert ...
• 153k
1 vote

### Output a random value from the last 16 values outputted

Java 8, 145 bytes ...
• 101

### Smallest Bit Rotation

Python 2, 76 bytes i,o=bin(input())[2:],[] for x in i:i=i[-1]+i[:-1];o+=[int(i,2)] print min(o) Try it online! Python2 because it accepts integers directly as ...
• 6,207
1 vote

### Smallest Bit Rotation

R, 62 bytes \(n,j=2^(0:(i=log2(n))))min(j%*%matrix(n%/%j%%2,i+2,i+2)[-1,]) Attempt This Online! Instead of iteratively rotating bits, we use them to fill a matrix ...
• 28.7k
1 vote

• 113k

### Smallest Bit Rotation

Excel, 81 80 71 69 bytes =LET(a,DEC2BIN(A1),b,LEN(a),c,SEQUENCE(b),MIN(BIN2DEC(MID(a&a,c,b)))) Input n With many thanks to @KevinCruijssen for the great ...
• 131

### Smallest Bit Rotation

APL (Dyalog Extended), 9 bytes Anonymous tacit prefix function. ⌊/⍳⊥⍤⌽¨⊤¨ Try it online! ⌊/ the smallest (lit. minimum-...
• 29.2k

### Smallest Bit Rotation

><> (Fish), 91 bytes i0$1>:@$:@)?!v\ ;n\^@+1$*2@ <r$@:\?=@:$@:r-1/&~$?)@:&: 2+*2~v?:}:{%2:/.2b-%1:, 1$*2$/.38- Try it Instead of counting ...
• 7,126

### Smallest Bit Rotation

JavaScript (Node.js), 63 bytes x=>'0b'+[...y=x.toString(2)].map(t=>y=y.slice(1)+t).sort()-0 Try it online! t keeps ...
• 16.2k

### Smallest Bit Rotation

Octave, 73 bytes It's not pretty, and it doesn't work on TIO. But it works in the program itself. ...
• 45.5k
1 vote

### Smallest Bit Rotation

Java 10, 118 bytes n->{var b=n.toString(n,2);for(int l=b.length(),i=l,t;i-->0;n=t<n?t:n)t=n.parseInt((b+b).substring(i,i+l),2);return n;} Input $n$; ...
• 113k

### Smallest Bit Rotation

J, 16 bytes [:<./2#.i.|."{#: Try it online! #:: Convert $n$ to binary. i. ...
• 8,711

### Smallest Bit Rotation

05AB1E, 6 bytes bā._Cß Input $n$; outputs the smallest bit rotation. Try it online or verify all test cases. Both the $[1,n]$ list with an input $n$ and ...
• 113k

### Yakko's New World Order

MS-DOS .COM format (8086), 220 bytes Takes a CR-LF delimited list of countries from standard input. ...
• 4,387
1 vote

• 14.9k

• 14.9k

...

### Help me sell old donuts

Vyxal, 19 bytes ȧ₁?›(-½:ȧ~+^-Þr)_-∑ Try it Online! or verify all test cases
• 826
1 vote

### Am I an insignificant array?

Excel, 35 33 bytes =AND(ABS(DROP(ζ,1)-DROP(ζ,-1))<2) 2 bytes saved under the assumption that the input can be arbitrarily chosen so as to be a vertical vector.
• 131

### Help me sell old donuts

Go, 169 bytes ...
• 5,403
1 vote

### Help me sell day-old bagels

Go, 106 bytes func(a[]int)(s int){l,h:=0,100 for _,o:=range a{if h+l<o{s+=h+l}else{s+=o} if o<h{l=h-0}else{l=0}} return} Attempt This Online! Port of Olivier'...
• 5,403
1 vote

### Am I an insignificant array?

Thunno, $7 \log_{256}(96) \approx$ 5.76 bytes z[ZA2<P Attempt This Online! Outputs 0 for False and ...
• 5,590
1 vote

### Am I an insignificant array?

Julia, 23 bytes ~x=all(<(2),diff(x).^2) Attempt This Online! (Currently, the site doesn't seem evaluate any Julia code properly. Since ...