Skip to content

emmajiugo/word-anagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1422a51 · Jul 12, 2024

History

2 Commits
Jul 12, 2024
Jul 12, 2024
Jul 12, 2024
Jul 12, 2024

Repository files navigation

Word Anagram Finder

  • Find words that are anagrams from a dictionary word list.
  • Using ANATREE (Alphabetical Map)

  • The alphabetic map maintains a hash table of all the possible words that can be in the language (this is referred to as the lexicon). For a given input string, sort the letters in alphabetic order. This sorted string maps onto a word in the hash table. Hence finding the anagram requires sorting the letters and looking up the word in the hash table.

  • The sorting can be done in linear time with counting sort and hash table look ups can be done in constant time.

  • For example, given the word ANATREE, the alphabetic map would produce a mapping of { AAEENRT -> {"anatree"} }.

About

Anagram finder from word dictionary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages