Question: Missing String Given a string consisting of lowercase letters only, find the typographically smallest string not present as a substring in it. Given two string

Missing String

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:

  • |S1|<|S2|
  • |S1|=|S2|
  • S1 is lexicographically smaller than S2

Input:

The first line of input contains the string S.

Output:

Answer as stated above.

Constraints:

1|S|105

SAMPLE INPUT

saurabh

SAMPLE OUTPUT

c

Explanation

The given string saurabh , does not contain c hence answer is c.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!