Skip to main content
9 votes

Compute the degree of a string

Cubical Agda, 1134 bytes Uses Agda 2.6.4.3, the cubical library 0.7 and the standard library 2.0. ...
Naïm Favier's user avatar
9 votes

Cold Bee and Old Beer

Python 3, 59 bytes lambda d:[[i,j]for i in d for j in d-{i}if{i[1:],j[:-1]}<d] Try it online!
Mukundan314's user avatar
  • 12.3k
9 votes
Accepted

Break a word into vowels and consonants

Python, 54 bytes lambda s:"".join(sorted(s+" ",key="aiueoAIUEO".count)) Attempt This Online! Returns a single string with the two ...
Albert.Lang's user avatar
  • 2,884
7 votes

Find characters common among all strings

Jelly, 3 bytes œ&/ Takes a single input argument with a list of strings. Try it online! Explanation Reduce (/) using ...
Luis Mendo's user avatar
  • 105k
7 votes

Find characters common among all strings

Python, 65 60 bytes -5 thanks to Jitse (unnecessary generator-to-list inside join(): -2; replace set(X) with ...
Nicola Sap's user avatar
  • 3,685
6 votes

Decode a Caesar ciphertext with high probability

Vyxal, 10 bytes, 99.9%, score 10.01 ‡ka*݇øDL∵ Try it Online! Based on Jonathan Allan's idea of compressing the strings, this takes the rotation that's compressed ...
emanresu A's user avatar
  • 38.8k
6 votes

Cold Bee and Old Beer

Jelly, 11 bytes œ!2ḊṖƭ€fƑ¥Ƈ Try it online! Don't love resorting to ƭ for this. ...
Unrelated String's user avatar
6 votes

Compare two strings, with NaC

Python, 92 bytes [🧍‍♂️👫🧍🧑‍🤝‍🧑🧍‍♂️] This is a community effort: Jonathan Allan's and Mukundan314's significant (-37 bytes) improvements on my original idea. ...
Nicola Sap's user avatar
  • 3,685
6 votes

Break a word into vowels and consonants

C (gcc), 86 bytes Prints the consonants, followed by a space, followed by the vowels. ...
Arnauld's user avatar
  • 193k
5 votes

Decode a Caesar ciphertext with high probability

Jelly, 19 bytes, \$94.65\%\$; score \$=\frac{10000\times 19}{9415}\approx 20.18\$ ØaṙJ,€¤y€ċⱮ“Ẉ²»S$ÞṪ A monadic Link that accepts the encrypted text and yields its ...
Jonathan Allan's user avatar
5 votes

Cold Bee and Old Beer

Charcoal, 34 32 bytes WS⊞υιFυEΦυ¬∨⁼ικ⁻⟦Φιν✂κ⁰±¹⟧υ⁺⁺ι κ Try it online! Link is to verbose version of code. Explanation: WS⊞υι ...
Neil's user avatar
  • 172k
5 votes

Cold Bee and Old Beer

Haskell, 54 bytes f w=[[x,y]|x<-w,y<-w,x/=y,elem(tail x)w,elem(init y)w] Attempt This Online!
matteo_c's user avatar
  • 6,480
5 votes

Cold Bee and Old Beer

R, 76 69 bytes Edit: -1 byte thanks to @int 21h -- Glory to Ukraine --. ...
pajonk's user avatar
  • 16.7k
5 votes

Compare two strings, with NaC

Jelly,  19  16 bytes Ḳj¥þØAZŒpM€§QḌ«4 A monadic Link that accepts a pair of lists of characters (from A-Z plus the space ...
Jonathan Allan's user avatar
5 votes

Build the first 6 letters of an Italian codice fiscale (tax identification number)

JavaScript (ES6), 138 bytes Expects the input in lowercase and returns a string in lowercase as well. ...
Arnauld's user avatar
  • 193k
4 votes

Remove Spaces, Maintaining Capitalization

R, 96 95 bytes \(s,p=utf8ToInt(s)){p[U]=p[U<-p%%65<26]+32 r=p[p>32] r[V]=r[V<-U[seq(r)]&r>96]-32 intToUtf8(r)} Attempt This Online! Alternative <...
pajonk's user avatar
  • 16.7k
4 votes

Cold Bee and Old Beer

Arturo, 55 bytes $->_[permutate.by:2_|select'p->_⊃@[drop p\0chop p\1]] Requires modern Arturo, hence the online playground won't run this yet. Here's a ...
chunes's user avatar
  • 24.7k
4 votes

Cold Bee and Old Beer

Brachylog, 15 bytes {⊇Ċp.bʰkᵗ∈ᵛ?∧}ᶠ Try it online! Explanation ...
Fatalize's user avatar
  • 38.9k
4 votes

Compare two strings, with NaC

Charcoal, 34 bytes ≔⪪θ?ζ≔⪪η?εI∨⁻›⪫ζA⪫εZ‹⪫ζZ⪫εA∧№⁺θη?² Try it online! Link is to verbose version of code. Outputs -1 if the ...
Neil's user avatar
  • 172k
4 votes

Break a word into vowels and consonants

Ruby, 31 bytes ->s{[v=s.grep(/[aeiou]/i),s-v]} Try it online! Input as an array of characters, assumed to contain only uppercase and lowercase letters. Output ...
Dingus's user avatar
  • 11.2k
4 votes

Build the first 6 letters of an Italian codice fiscale (tax identification number)

Retina 0.8.2, 94 92 bytes (.+?) (..? \w+|\S+)$ $2¶$1 %`\W %O$`([AEIOU])|. $.1 (¶.).(.[^AEIOU]) $1$2 %`$ X %M!`^... ¶ Try it online! Takes input in upper case but ...
Neil's user avatar
  • 172k
4 votes

Find characters common among all strings

K(ngn/k), 8 20 10 bytes -10 bytes thanks to ovs. &&/#''=:' Try it here! 20 bytes verison
akamayu's user avatar
  • 561
4 votes

Find characters common among all strings

R, 49 bytes \(S)Reduce(\(x,y)y[pmatch(x,y,0)],strsplit(S,"")) Attempt This Online! Or alternatively, this 66 bytes version: R, 66 bytes ...
int 21h Glory to Ukraine's user avatar
3 votes

Bernardino identifies unaltered dollar words

R, 32 bytes sum(strtoi(scan(,""),36)-9)==100 Try it online! Since a word can be imported as a character array (==vector in R), here is a solution which ...
int 21h Glory to Ukraine's user avatar
3 votes

Bernardino identifies unaltered dollar words

Go, 69 bytes func(s string)bool{i:=0 for _,r:=range s{i+=int(r)-96} return i==100} Attempt This Online!
bigyihsuan's user avatar
  • 9,776
3 votes

A cube of text឵

Vyxal, 13 bytes L?∞Ṫ»∨¹0²H»ø∧ Try it Online! Indirectly -1 byte thanks to Kevin Cruijssen, I forgot how canvas operator overloading works. ...
emanresu A's user avatar
  • 38.8k
3 votes

"Hello, World!"

Lazy K, 555 bytes ...
Esolanging Fruit's user avatar
3 votes

"Hello, World!"

AWK, 18 bytes $0="Hello, World!" Try it online! AWK defaults to {print $0}. Pass/pipe this anything and it will just print "Hello, World!". <...
C K's user avatar
  • 91
3 votes

Remove Spaces, Maintaining Capitalization

R, 106 101 bytes -5 bytes thanks to Giuseppe ...
int 21h Glory to Ukraine's user avatar
3 votes

Remove Spaces, Maintaining Capitalization

Uiua SBCS, 16 bytes ¯⍜▽¯:⌵▽⊸≠@ :=1⊸± Try it!
chunes's user avatar
  • 24.7k

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