Write an efficient function to find the first non-repeated character in a string. For instance, the first non-repeated character in "total" is 'o' and the first non-repeated character in "teeter" is 'r'. Right-click and "View page source" to see the solution. The runtime is O(n) + O(n) ==> O(2n) ==> O(n) which is linear time which isn't bad.
String: '' ==>
String: '' ==>
String: '' ==>
String: '' ==>
String: '' ==>