DEV Community

Discussion on: Solution: Prefix and Suffix Search

Collapse
 
midasxiv profile image
Midas/XIV

Second article I have read of yours and I have to say if I would've gone through every single article of yours if this was available 3 years ago.

I got the most value of this article from the following lines

Whenever we have to deal with searching for data using a prefix or a suffix, this naturally points to a trie solution.

It's really helpful when you point out which data structure to think of given a certain situation.

Thanks :)

Collapse
 
seanpgallivan profile image
seanpgallivan

Thanks for the comment!

I admit, when I started writing this series, my main thought was to attempt to write something that I would have wanted to read myself. All too often I've seen solution posts in which the code is just displayed, sometimes with only a bare minimum of explanation. Other posts do a lot to highlight how a particular data structure or algorithm works, which is great, but they fail to describe the information's connection to the specific problem.

I mean, let's face it: pretty much anyone who is a coder will have long-since mastered the art of looking up data (thanks, stackoverflow!), but the biggest challenge, I've found, lies in figuring out the right question to ask. So when I write up a solution, I try to focus on how you get from the problem description to the "right question".

So again, thank you !