Smallest Substring Of A String Containing All Unique Characters Of Itself
medium
1. You are given a string str. 2. You have to find the smallest window length that contains all the unique characters of the given string.
Constraints
1 <= length of string <= 10^6
Format
Input
A string
Output
A number representing smallest window length that contains all unique characters of the given string.
Example
Sample Input
aabcbcdbca
Sample Output
4
Question Video