added algorithm that displays the first non-dup char in the char stream