Company: Amazon_5sep
Difficulty: medium
Retrieve Data Problem Description The Data Science Team at Amazon is facing a unique challenge. A portion of their data has gone missing from their database. However, they believe they can recover the lost data based on the following information: The missing data is a permutation of the characters found in the string firstInfo . The missing data is lexicographically greater than the string secondInfo . The missing data is the lexicographically smallest string that satisfies the above two conditions. In other words, they are searching for the smallest string that meets these criteria. A string x is lexicographically smaller than a string y if: x[i] < y[i] at the first position i where x and y differ, or x is a prefix of y (where |x| denotes the length of string x ). Complete the function retrieveData in the editor below. The function retrieveData has the following parameters: firstInfo : the string that contains the first information. secondInfo : the string that contains the second