algorithm to find a word in dictionary
Answers
Answered by
2
Answer:
#love...
Explanation:
Define L to be the total number of characters in the dictionary over all words. Then the best possible time complexity (assuming words shorter than S ) is O(N + L) . However, the existing algorithm is O(N * W) , which might be O(N * L) in the case where dictionary words are a small constant in size.
Answered by
1
STEP 1 - Find the word you want to look up. STEP 2 - Find the letter that the word begins with. STEP 3 - Open the dictionary to the page with the relevant letter, in this case the letter C. STEP 4 - Now look at the second letter in the word you are looking for...
Similar questions