Given a string consisting of lowercase letters only, find the typographically smallest string not present as a substring in it.
Given two string S1 and S2. S1 is considered typographically smaller than S2 if either:
The first line of input contains the string S.
Answer as stated above.
Top comments (1)
This is from a ongoing contest.Try yourself dont ask for help without trying