Shortest unique substring
Your task
Given a string s of lowercase letters (1 <= len(s) <= 1000), return the length of the SHORTEST substring that occurs exactly once in s. Such a substring always exists for non-empty s (the whole string occurs once unless it is fully periodic, in which case a longer-but-unique length is returned). Return that minimal unique length.
Examples
shortest_unique_substring_len(s: str) -> intExample 1
Input
shortest_unique_substring_len("aabba")Output
2