Implement Prototype(feeds [][]int) []int by concatenating and sorting; Solve uses a min-heap with one candidate per active feed. Each feed is already nondecreasing. Preserve duplicates and all caller-owned inner slices. Empty feeds are valid. Include O(k) feed inspection and O(N log(k+1)) emission work, with O(k) heap space excluding output.
Edit exercise.go; retain the public types and signatures. prototype and final are separate stages. The executable tests recover panics as failures, report named checks, and exit nonzero on any failure. A successful run must execute at least one check. Tests use logical time or explicit synchronization where relevant.
Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
Loading editor…
No results yet.
Complete the starter code, then run the checks.
Results and errors will appear here.