Stream of Characters
Explore how to build a custom data structure that processes a streaming sequence of characters and identifies if any suffix matches words from a predefined list. This lesson helps you implement and query a class that efficiently tracks suffixes in real-time, improving your ability to solve pattern matching problems common in coding interviews.
We'll cover the following...
We'll cover the following...
Statement
Design a data structure that processes a stream of characters and, after each character is received, determines if a suffix of these characters is a string in a given array of strings words.
For example, if words = ["dog"] and the stream adds the characters