Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Iterate through the string from left to right. Keep track of the elements you have already seen in a set.
If the current element is already in the set, return that element.