459. Repeated Substring Pattern
Problem Statement
Input: s = "abab"
Output: true
Explanation: It is the substring "ab" twice.Input: s = "aba"
Output: falseInput: s = "abcabcabcabc"
Output: true
Explanation: It is the substring "abc" four times or the substring "abcabc" twice.Intuition
Links
Video Links
Approach 1:
Approach 2:
Approach 3:
Approach 4:
Similar Problems
Last updated