Union Iterator for Two Sorted Iterators (Dedup, Streaming, O(1) Extra Space)
Problem: Union Iterator for Two Sorted Iterators
You are given two iterators it1 and it2 that each produce elements in ascending order (streaming access only; no rewind/random access). Imp...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
