LeetCode

Prefix and Suffix Search

Click here for an explanation.