Untitled

mail@pastecode.io avatar
unknown
plain_text
9 days ago
252 B
1
Indexable
Never
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.



Merge all the linked-lists into one sorted linked-list and return it.



Sample Input:

3

1 4 5 -1

1 3 4 -1

2 6 -1



Sample Output:



1 1 2 3 4 4 5 6
Leave a Comment