Algorithm · Airwallex · Hard
You are given several independent data streams, each of which can be read only through offset/limit pagination. Write merge_sources so that all streams are combined into one output stream that is ordered by id and contains no duplicate id values. Each output record must be transmitted by calling writer.write(record) exactly once. The complete result may be too large to hold in memory, so you must not accumulate all records before writing. For the examples, Source([...]) is…
Checking your access…