Merge the Nested Batches
Intermediate SolvedA job returns results grouped into nested batches, but the next stage wants one flat sequence. Flatten the groups in order.
Implement `solve(List<List<Integer>> nested)` to return one flat list of all inner values in order.
Examples
Input
[[1,2], [3], [4,5,6]]Output
[1, 2, 3, 4, 5, 6]Input
[[], [7]]Output
[7]Hints
- addAll appends an entire inner list at once.
Tests
Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.