Repeated Substring Pattern
Return True if s can be built by taking some shorter non-empty piece of it and writing that piece two or more times in a row, otherwise False.
Example 1
s "abab"
returns true
ab written twice.
Example 2
s "aba"
returns false
No shorter piece repeats to make it.
Constraints
1 <= len(s) <= 100shas lowercase letters
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.