96 votes

Check if words are isomorphs

J, 4 bytes -:&= Usage 'THERMODYNAMICS' (-:&=) 'RAMBUNCTIOUSLY' NB. parens are optional 1 Explanation ...
  • 20.7k
37 votes

Check if words are isomorphs

K, 5 bytes This has a delightfully elegant solution in K! ~/=:' The "group" operator (monadic =) creates precisely the ...
  • 4,992
19 votes

Check if words are isomorphs

Python 2, 41 bytes f=lambda a,b:map(a.find,a)==map(b.find,b)
  • 201
17 votes

Write a short story using only valid code

SQL love poem SELECT * FROM Night_Sky WHERE Beauty LIKE "yours" 0 results returned I'm a little unsure of the rules here, as my output is obviously important ...
  • 271
14 votes

Highlight a Wordle guess

BQN, 19 18 bytesSBCS Improved after getting some new ideas from trying this in K. =+5>≠{⊒⌾(∾𝕨⊸⊔)˝𝕩}≍ Run online! BQN, 27 24 bytesSBCS Returns 0 for white, 1 ...
  • 56.2k
13 votes

Check if words are isomorphs

CJam, 9 bytes r_f#r_f#= Prints 1 if the words are isomorphs and 0 if they're not. Try it ...
  • 208k
10 votes

Check if words are isomorphs

JavaScript, ES7, 62 55 54 52 51 bytes f=(x,y,g=z=>[for(i of z)z.search(i)]+0)=>g(x)==g(y) The logic is simple. I simply convert both the inputs into their ...
  • 26.5k
10 votes

Generate a password

05AB1E, 19 17 16 bytes Saved 1 byte thanks to Kevin Cruijssen áΣl}.γl}éεgyθJ}J Try it online! or as a Test Suite Explanation ...
  • 52.8k
10 votes

Highlight a Wordle guess

Perl 5 + -pF, 57 bytes Returns 2 for green, 1 for yellow and leaves others as they were. ...
  • 22.7k
9 votes

Highlight a Wordle guess

05AB1E, 14 bytes øDÆĀ*ø`0Kvy®.; Input as a list of 1-based alphabet indices; modifies the list to change green to 0 and yellow ...
8 votes

insertspacesbetweenwords

Python 3, 88 f=lambda x,w,s=[]:[x or print(*s)]+[x.find(y)or f(x[len(y):],w,s+[y])for y in w.split()] String to split is x, ...
  • 141k
8 votes

Check if words are isomorphs

Bash + coreutils, 38 [ `tr $@<<<$1``tr $2 $1<<<$2` = $2$1 ] Note we are using the usual shell idea of truthy/falsy here - zero means SUCCESS or ...
8 votes

Check if words are isomorphs

Haskell, 33 29 EDIT: this is way too late, but i found this improvement using applicatives, that were added to prelude only in march 2015. ...
8 votes

Solve the New York Times Spelling Bee

PowerShell, 50 44 41 39 43 bytes param($a,$m)gc z|sls $m|sls "^[$a$m]{5,9}$" Notes Using a scriptblock (unnamed function) because there's still a requirement ...
  • 3,250
8 votes

Generate a password

Perl 6, 66 63 bytes {[~] map {+$_~.tail},sort {+$_,.lc},m:g/<:L>/.classify(&lc){*}} Try it online! Explanation ...
  • 10.5k
8 votes

Generate a password

C# (Visual C# Interactive Compiler), 105 bytes ...
  • 7,958
8 votes

Wordle solver challenge

Python 3, (1, 149, 945, 1118, 102) ...
7 votes

Let's play Hangman?

Python3, 299 Bytes ...
  • 81
7 votes

Same number letters

R, 106 bytes function(s){for(A in L<-LETTERS)s=sub(A,strrep(A,max(x<-+s-+Map(gsub,L,'',s,T))-x[A]--1),s,T);s} "+"=nchar Try it online! Base R approach : ...
  • 4,989
7 votes
Accepted

Generate a password

Japt v2.0a0 -P, 14 bytes f\l üv ñÊ®ÌiZÊ Try it ...
  • 39.6k
7 votes

Highlight a Wordle guess

Retina 0.8.2, 45 bytes +`(\w)(.{5})\1 +$2+ +`(\w)(.*,.*)\1 -$2- ,.* Try it online! Link includes test cases. Takes input as two comma-separated words. Matching ...
  • 156k
7 votes

Highlight a Wordle guess

R, 84 80 bytes function(s,g){e=s!=g;for(i in 1:5)s[x]=g[i]=1+is.na(x<-which(s*e==g[i])[1]);g*e} Try it online! My golfing skills are quite rusty after a long ...
  • 13k
7 votes

Highlight a Wordle guess

K (ngn/k), 32 31 bytes {g-(x~':x{x_x?y}\y@>g)@<>g:x=y} Try it online! Minor reordering and syntax change from the original answer below (and it returns ...
  • 69.9k
7 votes

Highlight a Wordle guess

K (ngn/k), 30 bytes Takes the guess as first argument and the secret as second. Returns a list with -1 for not highlighted, 0 for yellow and 1 for green. ...
  • 56.2k
7 votes

Wordle games without repeating letters

Vyxal, 11 bytes 'L5=;5ḋ'∑Þu Try it Online! Get all 5 letter words, and all 5 word combinations where all the letters are unique. Explained ...
  • 27.6k
6 votes

Check if words are isomorphs

Brainfuck, 169 168 162 144 140 131 130 Compatible with Alex Pankratov's bff (brainfuck interpreter used on SPOJ and ideone) and Thomas Cort's BFI (used on Anarchy Golf). The expected input is two ...
6 votes

Check if words are isomorphs

Haskell, 45 41 bytes h l=map(`lookup`zip l[1..])l x!y=h x==h y Returns True or False, e.g ...
  • 35.7k
6 votes
Accepted

Let's play Hangman?

PowerShell, 248 246 241 bytes ...
  • 3,250
6 votes

Solve the New York Times Spelling Bee

Mathematica, 143 130 bytes ...
6 votes

Generate a password

Retina, 67 66 41 39 bytes \P{L} O$`. $l$0 ir`\1*(.) $.0$1 N`\d+. -25 bytes and a minor bug-fix thanks to @Neil. -2 bytes thanks to @Neil and @Shaggy together. Try ...

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