As per my understanding solution should process items 1 by 1 and yield results as you go.
Also I believe task should highlight that input is sorted, so no need to sort it before processing, otherwise, it makes no sense in creating of generator, if you need first to sort all items from input before further processing.
I would suggest to take that into account in tests.
Lets say create 1 test where you provide huge input, may be even never ending input (e.g. generator)
And ask only first 5 items with next.
In such case if in solution someone sorts input collection or converts it to set, he will immediately understand that solution is not what you expect from them.
Created at: 2023/08/22 07:26; Updated at: 2023/08/23 12:14