I have an ordered list (dictionary - 100 thousand words) and many words to visit this list often. Thus, performance is a problem. I know that HashSet.contains (theWord) or Collections.binarySearch (sortedList, theWord) is very fast. But I'm not really looking for all the words.
I want to say that searching for "se" and getting all the words starts with "se". So, is there a ready-to-use solution in Java or in any libraries?
Best example: in a sorted list, a quick fix for the next operation
List.subList (String beginIndex, String endIndex) // returns the interval
myWordList.subList ("ab", "bc");
Note. This is a very similar question, but the accepted answer is not satisfactory.
Method Override Contains HashSet
source
share