A happy prefix is a non-empty prefix of a string which is also a suffix (excluding the whole string itself). Given a string s, return the length of the longest happy prefix. Return 0 if none exists.
Input: A quoted string s.
Output: Integer — length of the longest happy prefix.
Input: "level"
Output: 1
Explanation: 'l' is both prefix and suffix.Input: "ababab"
Output: 4
Explanation: 'abab' is prefix and suffix.Input: "abc"
Output: 0
Explanation: No happy prefix.1<=s.length<=10^5