If you’re not a medium member, you can read the story through this link.
Efficiently Check If One String Is a Shifted Version of Another
Efficiently Splitting Strings by Word Boundaries in TypeScript