Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
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 ...
ovs's user avatar
  • 59.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 ...
Emigna's user avatar
  • 53k
10 votes

Highlight a Wordle guess

Perl 5 + -pF, 57 bytes Returns 2 for green, 1 for yellow and leaves others as they were. ...
Dom Hastings's user avatar
  • 23.8k
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 ...
Kevin Cruijssen's user avatar
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 ...
briantist's user avatar
  • 3,280
8 votes

Generate a password

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

Generate a password

C# (Visual C# Interactive Compiler), 105 bytes ...
Gymhgy's user avatar
  • 7,998
8 votes

Wordle solver challenge

Python 3, (1, 149, 945, 1118, 102) ...
Surculose Sputum's user avatar
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 : ...
digEmAll's user avatar
  • 5,029
7 votes
Accepted

Generate a password

Japt v2.0a0 -P, 14 bytes f\l üv ñÊ®ÌiZÊ Try it ...
Shaggy's user avatar
  • 42k
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 ...
Neil's user avatar
  • 171k
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 ...
Kirill L.'s user avatar
  • 13.9k
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 ...
Bubbler's user avatar
  • 76.7k
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. ...
ovs's user avatar
  • 59.5k
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 ...
lyxal's user avatar
  • 33.5k
6 votes

Solve the New York Times Spelling Bee

Mathematica, 143 130 bytes ...
memethyl's user avatar
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 ...
Kevin Cruijssen's user avatar
6 votes
Accepted

Dissect a word and arrange all its letters in alphabetical order

05AB1E, 16 15 bytes -1 byte thanks to Kevin Cruijssen žKlsSåßi{ë”Í¼î® Try it online!
Grimmy's user avatar
  • 15.7k
6 votes

Wordle solver challenge

Python 3, [1, 49, 871, 1354, 40] Idea Use Knuth's minimax algorithm for Mastermind as default strategy. That is, minimize the number of remaining words for worst case group. Find good starting words. ...
didgogns's user avatar
  • 161
6 votes

Highlight a Wordle guess

Haskell, 112 bytes import Data.List f(x:y,z)=[0^x|elem x z]:f(y,delete x z) f _=[] x?z|x==z=(0,0)|1>0=(x,z) ((f.unzip).).zipWith(?) Try it online! Takes input ...
Wheat Wizard's user avatar
  • 98.8k
6 votes

Highlight a Wordle guess

K (ngn/k), 52 46 45 bytes {@[g;&[#'(=x)^\:&g;#'y]#'y:(=y)^\:&g:x=y;2+]} Try it online! -1 byte from ngn (thanks!). Starting with a list of positions ...
chrispsn's user avatar
  • 561
5 votes
Accepted

Solve the New York Times Spelling Bee

bash/dash/ash with grep and egrep, 31 30 29 bytes egrep ^[$1$2]\{5,}$ z|grep $2 This assumes you have a a word list in a file named ...
zgrep's user avatar
  • 1,591
5 votes

Same number letters

Perl 6, 82 bytes -3 bytes thanks to nwellnhof ->\a{a.=lc.=subst($_,$_ x a.comb(/<:L>/).Bag.values.max+1-a.comb($_))for 'a'..'z'} Try it online! Takes ...
Jo King's user avatar
  • 47.2k
5 votes
Accepted

Same number letters

05AB1E, 16 bytes lDáÙSйls¢Zα>×.; Try it online! Explanation ...
Emigna's user avatar
  • 53k
5 votes

Same number letters

J, 33 56 46 bytes t=:~:tolower (#~1+t*~:(*>./-])t*1#.e.)@toupper Try it online! Couldn't find a way to avoid using ...
Bubbler's user avatar
  • 76.7k
5 votes

Same number letters

R + stringr, 108 bytes I am not very good at stringr. Returns a mixture of lower and upper case since the question says it doesn't matter. ...
J.Doe's user avatar
  • 2,569
5 votes

Same number letters

JavaScript (ES6), 112 bytes s=>(m=g=F=>s.replace(/[a-z]/gi,c=>F(c.toLowerCase())))(c=>g[c]=c+c.repeat(m-g[c]),g(c=>m=(n=g[c]=-~g[c])<m?m:n)) Try ...
Arnauld's user avatar
  • 193k
5 votes

Wordle solver challenge

BQN ┌─ ╵ 1 2 3 4 5 6 7 8 9 1 56 407 861 722 210 44 13 1 ┘ The strategy is very basic, this just chooses the first word ...
ovs's user avatar
  • 59.5k
4 votes

Solve the New York Times Spelling Bee

Python 3.6  84  78 bytes -6 bytes thanks to WuTheFWasThat (splitlines -> split and ...
Jonathan Allan's user avatar
4 votes

Check if words are isomorphs

05AB1E, 6 bytes εæδË}Ë Try it online! Takes input as a list: ['ESTATE', 'DUELED'] Explanations: ...
scottinet's user avatar
  • 1,031

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