Question: JAVA PROGRAMMING Given a list of strings (a dictionary) implement the following two functions: 1. void setup(List words)//Preprocesses the dictionary to do fast lookups through
JAVA PROGRAMMING
Given a list of strings (a dictionary) implement the following two functions:
1. void setup(List
2. boolean isMatch(String word) //Returns true if the word exists in the dictionary, false otherwise.
Examples:
setup({"foo", "bar", "baz"})
isMatch("f.") -> false
isMatch("ba.") -> true
isMatch("foo") true
isMatch("f.o") true
Word given to isMatch can contain a wild card character "." which matches exactly one character.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
