Explanation: The possible strings formed by placing the character C in string at different indices are {“eabcd”, “aebcd”, “abecd”, “abced”, “abcde”}. The lexicographically smallest string is “abcde”.
What is lexicographically smaller string?
25. The smallest lexicographical order is an order relation where string s is smaller than t, given the first character of s (s1) is smaller than the first character of t (t1), or in case they are equivalent, the second character, etc.
What is lexicographical string?
Two strings are lexicographically equal if they are the same length and contain the same characters in the same positions. ... Characters are compared using the Unicode character set. All uppercase letters come before lower case letters. If two letters are the same case, then alphabetic order is used to compare them.