Stream of Characters
hardImplement a stream checker that detects any suffix matching inserted words
Stream of Characters
Key Insight
Insert reversed dictionary words, then check stream suffixes by walking backward through the reversed trie.
Step 1Build Reversed Trie
Array
cd
0f
1kl
2HashMap
dc:2
f:1
lk:2
cd, f, kl become dc, f, lk in storage.
1 / 3