[LeetCode]Shortest Completing Word

题目描述:

LeetCode 748. Shortest Completing Word

Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given string licensePlate

Here, for letters we ...

继续阅读

[LeetCode]Prefix and Suffix Search

题目描述:

LeetCode 745. Prefix and Suffix Search

Given many words, words[i] has weight i.

Design a class WordFilter that supports one function, WordFilter.f(String prefix, String suffix). It will return the word with given prefix and suffix with ...

继续阅读