Find the first non-repeating number from a stream of numbers o(1)
Answers
Answered by
3
if you follow the first approach then you need to show the stream so that he can transverse in one more time find non repeating character at any moment if you extend approach discussed we need to go through the count array every time non repeating element is queried we can find first non repeating character from him at any moment without transversing in array ..
Similar questions
Geography,
6 months ago
Social Sciences,
6 months ago
Math,
1 year ago
Chemistry,
1 year ago
Physics,
1 year ago