Road Trip

  • The idea:

    • Preform a preprocessing step that reads all the words from a dictionary, sorts it into a hash table that maps all anagrams that map to their words.

    • {anagram} -> {vector of words that match anagram}

    • Next, read the license-plates.

      • Sort the word in the plate, and map it to the anagram dictionary word. If the word does not appear, continuously add a new alpha character until a word is found in the dictionary.

Last updated

Was this helpful?