Quantcast
Viewing latest article 7
Browse Latest Browse All 20

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 string
    • #'= build a dictionary mapping the unique letters to the number of times they occur
  • (...)y index into this with the list of words
  • &/' get the number of times the least common letter in each word appears in the grid (and implicitly return)

Viewing latest article 7
Browse Latest Browse All 20

Trending Articles