Company: Amazon_Ml_challenge
Difficulty: medium
Star Removal Problem Description You are given a string A. It may contain any number of '*' characters. Your task is to remove all '*' characters. While there is a '*', do the following operation: Delete the leftmost '*' and the smallest alphabet to its left. If there are several smallest characters, you can delete any of them. Return the lexicographically smallest resulting string after removing all '*' characters. Examples Example 1: Input: A = "aaba*" Output: "aab" Explanation: We should delete one of the 'a' characters with '*'. If we choose s[3], s becomes the lexicographically smallest. Example 2: Input: A = "abc" Output: "abc" Explanation: There is no '*' in the string. Example 3: Input: A = "aab*d*zd*" Output: "dzd" Explanation: In the first removal, removing the left most '*' at index 3. The smallest alphabet to its left(3) is "a". After the first removal "aab*d*zd*" becomes "abd*zd*" Now removing the left most '*' at index 3. The smallest alphabet to its left(3) is "a". After