A string is beautiful if it equals some string T concatenated with itself (T + T). Given a string s, return the length of the longest beautiful subsequence of s, or 0 if none exists. A subsequence…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.