Problem: https://leetcode.com/problems/repeated-substring-pattern/ Code: class Solution: def repeatedSubstringPattern(self, s: str) -> bool: return s in (s + s)[1:-1] # Points to note: # - A repeated string will reappear ...
Markdown supported · ⌘↵ to post
No responses yet.