46 votes

Scroll Word's font size selector

Word VBA, 199 147 126 116 102 100 87 85 Bytes Why emulate when you can do?! Declared function in the ThisDocument module that takes input ...
Taylor Alex Raine's user avatar
44 votes

Longest common substring in linear time

Python 2, 646 bytes ...
Mitch Schwartz's user avatar
31 votes

Bit run rundown

Python 2, 46 45 bytes f=lambda n,k=1:`k`in bin(n^n/2)and-~f(n,k*10) Try it online! How it works By XORing n and n/2 (dividing by 2 essentially chops off the ...
Dennis's user avatar
  • 209k
31 votes

Speed of Lobsters

convey, 59 47 bytes { ?;\,&:1< v^<^ ,<$1 "=>^}"@"} >">>#=" '*'>:<=0 Try it online! Run with ...
xash's user avatar
  • 11.2k
29 votes

Is there a single straight line in the matrix?

Python 2, 49 bytes Takes as input a 2D binary matrix \$ a \$, and its size \$ n \$. lambda a,n:sorted(map(sum,a+zip(*a)))[-2:]==[1,n] Try it online! There may be ...
dingledooper's user avatar
  • 22.2k
25 votes

Universal Spooky Meme Translator

Ruby, 50 44 43 bytes FGITW answer. Gotta go fast! Thanks to @Neil for saving 6 bytes. Oh right, crossed out 44 is still 44 ...
Value Ink's user avatar
  • 12.4k
24 votes

Make me a metasequence

Wolfram Language (Mathematica), 34 bytes 0~Range~19~Binomial~i~Sum~{i,0,#}& Try it online! The tier \$n\$ metasequence is the sum of the first \$n+1\$ ...
alephalpha's user avatar
  • 45.6k
21 votes

Backronymiser឵឵

C (gcc), 49 bytes f(char*a,char*t){for(;*a;)*a++^=*a-*t?0:32+!++t;} Try it online! Modifies a in place. Input ...
att's user avatar
  • 19.4k
19 votes

Make me a metasequence

Haskell, 34 bytes (iterate(init.scanl(+)1)[1..20]!!) Uses 0-indexed inputs (f 4 returns tier 5.) Haskell, 36 bytes ...
Lynn's user avatar
  • 67.9k
17 votes

Bit run rundown

Python 2, 46 bytes f=lambda n,r=1:max(r,n and f(n/2,1+~-n/2%2*r)) Try it online Extracts binary digits from n in reverse by ...
xnor's user avatar
  • 144k
17 votes

Longest Zero Sum Sub-array

Python 3, 47 bytes f=lambda x,*a:f(*a,x[1:],x[:-1])if sum(x)else x Try it online! It's simple breadth-first search, implemented recursively. The ...
dingledooper's user avatar
  • 22.2k
16 votes

Speed of Lobsters

JavaScript (ES6), 35 bytes Expects (haystack)(needle), where haystack is a list of characters and ...
Arnauld's user avatar
  • 186k
16 votes

What's my TIO uniqueness?

JavaScript (Node.js),  819  779 bytes Returns 0 for undefined TIO uniqueness. ...
Arnauld's user avatar
  • 186k
15 votes

Universal Spooky Meme Translator

Perl, 36 34 bytes s/\d+/"0|$&$^I"=~s#\^#**#r/gee The source code is 30 bytes long and it requires the switches -pi (+4 ...
Dennis's user avatar
  • 209k
15 votes

All the k-mers/n-grams

Jelly, 1 byte Jelly has a single byte dyadic atom for this very operation Try it online! (the footer splits the resulting list with newlines, to avoid a ...
Jonathan Allan's user avatar
15 votes

Is there a single straight line in the matrix?

Brachylog, 8 bytes {z|}≡ᵛ+1 Try it online! ...
Unrelated String's user avatar
14 votes

Bit run rundown

05AB1E, 6 bytes b.¡€gM Try it online! Explanation ...
Emigna's user avatar
  • 52.9k
14 votes

Even sum subarrays

Python 3.8 (pre-release), 57 bytes f=lambda S,p=1:S>[]and f(S[1:])+sum((p:=p^s%2)for s in S) Try it online! Similar to brute-force method below but should have ...
loopy walt's user avatar
  • 15.6k
14 votes

Check if the string is reshaped

Retina, 10 bytes ^(.+).*\1$ Try it online! Works in any flavor of regex that supports backreferences.
att's user avatar
  • 19.4k
14 votes

Output every sublist ... eventually

Haskell, 31 27 bytes -4 bytes thanks to Wheat Wizard! Takes an infinite list as input and returns each finite sublist an infinite number of times. ...
ovs's user avatar
  • 57.8k
13 votes

Is it a circumfix?

J, 23 21 20 bytes >&#*]e.1}:@}.-&#]\.[ Try it online! -1 byte thanks to Bubbler Return true if: >&# left ...
Jonah's user avatar
  • 32.5k
13 votes

cadaddadadaddddaddddddr - linked list accessing

JavaScript (V8), 48 bytes a=>f=b=>b[2]?b[[x,...r]=f(b.slice(1)),1]<f?x:r:a Try it online! -2 bytes thanks to @Arnauld!
user81655's user avatar
  • 11.2k
13 votes

Count the shared substrings with 2 programs

Python, score 0, 520 bytes -25 from @Grain Ghost -78 from @Jonathan Allan -61 from @RootTwo -4 from @Grain Ghost ...
97.100.97.109's user avatar
12 votes

Fractal Smoke Sequence

Python 2, 95 bytes l=[];n=input() exec"a=min(set(range(n))-{2*b-c for b,c in zip(l,l[1::2])});print-~a;l=[a]+l;"*n The main trick is in generating the ...
xnor's user avatar
  • 144k
12 votes
Accepted

Sum of Binary Substrings

Jelly, 10 7 bytes BṡRḄFS_ Try it online! How it works ...
Dennis's user avatar
  • 209k
12 votes

Subsequence Substitution

Python 2, 88 bytes def f(a,b,c,o=""): for q in a:x=q==b[:1];o+=c[:x]or q;b=b[x:];c=c[x:] print[o,a][c>''] A function that takes in the three strings and ...
Sp3000's user avatar
  • 61.7k
12 votes

Scroll Word's font size selector

JavaScript (ES6), 103 101 bytes Takes input as an array of -1 / 1. ...
Arnauld's user avatar
  • 186k
12 votes

Column-wise summation of overlapping slices

J, 11, 9 8 bytes -1 byte thanks to miles! [:+//.]\ How it works? The left argument is s, the right one - L ]\ - splits L ...
Galen Ivanov's user avatar
12 votes

Playing with the musical turtle

Java 8, 48 39 33 bytes s->"ROYGBRO BGYORBG".indexOf(s)|7 -6 bytes thanks to @RickHitchcock, so make sure to upvote him as well! Takes uppercase color ...
Kevin Cruijssen's user avatar

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