Quantcast
Channel: Words with Easy Letters in a Word Search - Code Golf Stack Exchange
Browsing latest articles
Browse All 20 View Live

Answer by The Thonnu for Words with Easy Letters in a Word Search

Thunno, \$ 6 \log_{256}(96) \approx \$ 4.94 bytesez1scmAttempt This Online!Explanationez1scm # Implicit inpute # Map: sc # Count of each in z1 # Second input m # Minimum # Implicit output

View Article


Answer by DeathIncarnate for Words with Easy Letters in a Word Search

Burlesque, 18 bytesf:qsv^mjlnm{)gv<]}Try it online!f: # Count frequency (as {count val}) in gridqsv # Save in global map^m # Apply to each frequencyj # Swapln # Split into linesm{ # Map over words...

View Article

Answer by alephalpha for Words with Easy Letters in a Word Search

PARI/GP, 43 bytesf(g,d)=[vecmin([#[1|x<-g,x==c]|c<-w])|w<-d]A port of pxeger's Haskell answer.Takes the grid as a list of characters, and the word as a list of list of characters.Attempt This...

View Article

Answer by naffetS for Words with Easy Letters in a Word Search

JavaScript (V8), 7369 63 bytesg=>l=>l.map(w=>Math.min(...[...w].map(c=>g.split(c).length-1)))Try it online!-4 bytes thanks to emanresu A-6 bytes thanks to Matthew JensenJavaScript...

View Article

Answer by pxeger for Words with Easy Letters in a Word Search

Haskell, 41 bytesg#d=[minimum[sum[1|x<-g,x==c]|c<-w]|w<-d]Attempt This Online!-3 bytes thanks to @ovs

View Article


Answer by Dom Hastings for Words with Easy Letters in a Word Search

Perl 5+-MList::Util+(min), 44 bytessub{$g=pop;map{min map$g=~s/$_/$_/g,/./g}@_}Try it online!ExplanationNot entirely dissimilar to other solutions, this is a function submission in Perl (unusual I...

View Article

Answer by coltim for Words with Easy Letters in a Word Search

K (ngn/k), 14 bytes{&/'(#'=,/x)y}Try it online!Takes the grid of letters as x (the first arg), and the list of words as y (the second arg).(#'=,/x),/x flatten the grid of letters into a single...

View Article

Answer by Jonathan Allan for Words with Easy Letters in a Word Search

05AB1E, 3 bytesε¢WTry it online!How?Note: Uses the current interpretation of https://codegolf.meta.stackexchange.com/a/2216/52210 that seems to be being used, that not only may a string be provided as...

View Article


Answer by att for Words with Easy Letters in a Word Search

Wolfram Language (Mathematica), 22 bytesMin/@Map@Counts@#/@#2&Try it online!Input [grid, {words...}], where both the grid and words are 1d lists of characters.

View Article


Answer by naffetS for Words with Easy Letters in a Word Search

Vyxalr, 6 bytesƛƛ⁰O;gTry it Online!Explainedƛƛ⁰O;gƛ # Map the first inputƛ ; # Map for each letter in the word⁰O # Count how many times the letter appears in the second input g # Get the minimumVyxalr,...

View Article

Answer by AZTECCO for Words with Easy Letters in a Word Search

Haskell, 71 64 51 bytesg#l=[[x|x<-[1..],c<-w,x==sum[1|e<-g,e==c]]!!0|w<-l]Try it online!Massively outgolfed by @pxeger answer, check it out.Full list comprehension solutionsaved 13 Bytes...

View Article

Answer by Dominic van Essen for Words with Easy Letters in a Word Search

Husk, 5 bytesmo▼m#Try it online!m # map over each word in second arg o # compose 2 functions:▼ # get minimum of m # mapping # # number of occurrences in first arg

View Article

Answer by Kirill L. for Words with Easy Letters in a Word Search

R, 43 bytes\(w,g,`*`=sapply)w*\(i)min(i*\(j)sum(!g-j))Attempt This Online!Since we are allowed to input integer codepoints, here it goes. Takes input as a list of codepoint vectors for words, and...

View Article


Answer by m90 for Words with Easy Letters in a Word Search

Python 3, 42 byteslambda g,W:[min(map(g.count,w))for w in W]Try it online!Takes the grid as a string, with any non-letter separator, and an iterable of strings.

View Article

Answer by G B for Words with Easy Letters in a Word Search

Ruby, 46 bytes->g,w{w.map{|x|x.chars.map{|c|g.count c}.min}}Try it online!

View Article


Answer by chunes for Words with Easy Letters in a Word Search

Factor, 38 bytes[ [ counts values infimum ] with map ]Attempt This Online!

View Article

Answer by Neil for Words with Easy Letters in a Word Search

Retina 0.8.2, 74 bytes\G(.+)¶$1ms`(?<=^(.+)¶.+)$;$11A`%(`\G(.)(?=(.*?\1)+)$#2¶A`;O#`1G`Try it online! Explanation:\G(.+)¶$1Flatten the grid.ms`(?<=^(.+)¶.+)$;$1Append a copy of the grid to each...

View Article


Answer by Neil for Words with Easy Letters in a Word Search

Charcoal, 17 bytesWS≔⁺ωιωWS⟦I⌊Eι№ωκTry it online! Link is to verbose version of code. Takes input as two newline-separated lists of newline-terminated strings. Explanation:WS≔⁺ωιωInput and flatten the...

View Article

Answer by pxeger for Words with Easy Letters in a Word Search

Jelly, 5 bytesċⱮⱮṂ€Attempt This Online!Hmmm.

View Article

Words with Easy Letters in a Word Search

Introduction:Apparently I keep coming up with word search related challenges lately. :)When I do the word search in the Dutch news paper, some words are very easy to find because they contain letters...

View Article
Browsing latest articles
Browse All 20 View Live