First Non-RepeatedCharacter solution
Repeated Substring solution