String replacement
Question · Posted Jul 2024
String Replacement Two Strings are given, word and substr, some of the characters in the word are a question mark (?) find the lexicographically smallest string that can be obtained by replacing? characters such that substr papers at least once if it is not possible to do so return "-1" Note: A substring is a continuous sequence of characters within a string for example "BCS is substring of "abcde" but "ac" is not For two strings a and b of ...
The full answer & interview discussion are available to premium members.
Log in Create a free account