Skip to content

Instantly share code, notes, and snippets.

@mccartykim
Created September 25, 2017 18:05
Show Gist options
  • Save mccartykim/059e57ec3bfd4fb75f38aafbaf790472 to your computer and use it in GitHub Desktop.
Save mccartykim/059e57ec3bfd4fb75f38aafbaf790472 to your computer and use it in GitHub Desktop.

Wordplay (original host: https://hackpad.com/More-graphs-and-trees-inc-wordplay-Jy4GxlaagVH) Practical tasks that have been asked in interviews, and which Jessica McKellar was disappointed some Hacker Schoolers had trouble with.

Using the official SOWPODS Scrabble dictionary:

what words contain "UU"? What words contain "Q" without "U"?

what letters, if any, never appear doubled? (by that I mean -- "AA" does appear doubled because it is in "AARDVARK", "BB" does appear doubled because it is in "BUBBLE" -- are there any letters that never appear doubled in a word)

what is the longest palindrome?

what words contain all of the vowels and Y, in alphabetical order?

what words contain all of the vowels and Y, in any order?

what letter makes the most appearances in a single word, and what is that word?

what words are the longest anagrams of each other? (single words, please, no phrases)

Some of these questions are a good opportunity to explore regular expressions.

For each of these questions, after implementing a solution:

what is the big-O complexity of the solution?

what is another way of solving the problem?

is there a faster solution?

As a Wordplay grand finale:

Implement a Scrabble cheater: https://openhatch.org/wiki/Hacker_School_Scrabble_challenge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment