ThoughtSpot Interview Question

Longest Happy Prefix in a given string