nowhere in the problem was it mentioned that we need to preserve the order or the chars in the string.
Since it is not mentioned, and it is lexicographically minimum,
So why not we just take the Set_arr = set(inputArray) which gives us the unique elments, and just return the sorted(list(Set_arr)).
the main catch here is that no where was it mentioned that the order in which the elements appear needs to be preserved if that element is not present in the later part of the array.