From the website called interviewbit.com, I find an interesting problem called “First non-repeating character in a stream of characters”, by doing some research on this problem, I will provide a queue-based solution with time complexity O(n).

Problem Description:

Given a string A denoting a stream of lowercase alphabets. …

Aigerim Suleimenova

Dedicated Computer Scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store