Print the first non-repeated character from a string in Swift

Swift
🤖 Code Explanation
This code finds the first non-repeated character in a given string. It does this by creating a dictionary of characters and their counts. It then loops through the string again and returns the first character with a count of 1.

More problems solved in Swift



















