Implement prototype(feeds) and solve(feeds). Every inner array is already sorted nondecreasing. Return all Number values in one nondecreasing array, retaining every duplicate. Empty inner and outer arrays are valid. For [[], [1, 4], [1, 2, 8]], return [1, 1, 2, 4, 8].
Prototype: concatenate and numerically sort. Final: use one heap candidate per active feed. Preserve the outer array and every inner array. No sortedness or other extra validation is required. Include inspecting every feed when explaining runtime.
All numeric inputs and finite arithmetic results in this lesson are safe-integer Numbers. Use null for documented absence, not undefined or a numeric sentinel. Return actual booleans where the contract requires them. Do not add validation requirements beyond the documented inputs.
Run with Node.js 20+ from this directory:
node main.mjs --stage prototype
node main.mjs --stage finalEdit exercise.mjs; keep main.mjs unchanged. Both stages begin as unfinished learner functions. The website uses the same test functions in a separate browser worker. Tests check deterministic examples, boundaries, documented validation, input preservation, and stage-specific cases. Passing tests does not prove the required time complexity.
Complete the starter code, then run the checks.
Results and errors will appear here.