Sobes.tech
Junior — Senior

Merging two sorted streams into one sorted stream

livecode

Task condition

The function receives two input channels, each generating a finite non-decreasing sequence of integers. It is necessary to create and return a channel that merges the elements of both sources so that the resulting stream is also non-decreasing.