Concept Flow - First Non Repeating Character Using Hash
Start
Create empty hash map
Iterate over string characters
Update count in hash map
Iterate over string again
Check if count is 1
Return char
If none found, return -1
End
We count each character's frequency using a hash map, then find the first character with count 1.
