Types of problems and data structures and algorithms used to solve them
1. String search
Trie、HashMap
2. Frequency, statistics, frequency statistics results
HashSet, HashMap getOrDefault(key, 0)+1 count, bucket sorting
3, string replacement, combination
HashMap duplicate check, custom Trie (word tree), word array comparison char
4, custom data structure, sorting
PriorityQueue, custom comparator
ps:
speed:
The fastest attribute array marking, i.e. preprocessing before starting the operation.