Missing String
Practice
3.3 (3 votes)
Algorithms
Medium
String manipulation
Problem
32% Success 911 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code
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:
\(\bullet |S_1| < |S_2| \\ \bullet |S_1| = |S_2| \text{ and } S_1 \text{is lexicographically smaller than } S_2\)
Input:
The first line of input contains the string S.
Output:
Answer as stated above.
Constraints:
\(1 \le |S| \le 10^5\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
1.Find Set
Points:30
3 votes
Tags:
AlgorithmsString SearchingString AlgorithmsC++
Points:20
47 votes
Tags:
ApprovedEasyMathOpen
Points:30
2 votes
Tags:
AlgorithmsGreedy AlgorithmsMediumString Manipulationhiring
Editorial
Login to unlock the editorial