Junior — Senior
Function that merges multiple sorted linked lists
livecode
Task condition
It is necessary to write a function that takes an array of k sorted linked lists in ascending order and merges them into a single linked list, maintaining the sorted order. The function should return the resulting list.
Example: Input: sequences = [[1, 4, 5], [1, 3, 4], [2, 6]] Output: [1, 1, 2, 3, 4, 4, 5, 6]