
Asked in Amdocs
First Unique Character in a Stream Problem Statement
Given a string A
consisting of lowercase English letters, determine the first non-repeating character at each point in the stream of characters.
Example:
Input:
bbaca
Output:
baaac
Explanation:
For the given string 'bbaca':
1. First stream is 'b'; first non-repeating character is 'b'.
2. Next stream is 'bb'; no non-repeating character.
3. Next stream is 'bba'; first non-repeating character is 'a'.
4. Next stream is 'bbac'; first non-repeating character is 'a'.
5. Next stream is 'bbaca'; first non-repeating character is 'c'.
Constraints:
1 <= T <= 100
1 <= N <= 10000
Input:
The first line contains an integer 'T', the number of test cases.
Each of the next 'T' lines contains a string 'A'.
Output:
For each test case, print a string of characters that represent the first non-repeating character at each point in the stream.
Note: You do not need to print anything; it is handled externally.

Given a string of lowercase English letters, find the first non-repeating character at each point in the stream.
Create a hashmap to store the frequency of each character as it appears in the stream.
It...read more
Top Software Developer Interview Questions Asked at Amdocs
Interview Questions Asked to Software Developer at Other Companies
Top Skill-Based Questions for Amdocs Software Developer


Reviews
Interviews
Salaries
Users

