The round-robin algorithm collects elements from input streams in circular order, starting from the output stream with index 0.