Your question is Merge K Sorted Lists. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Merge k Sorted Lists
Asked in the Coding stage. LeetCode 23.
Implement merge_k_lists(lists). Each input list is sorted in nondecreasing order. Return one sorted list containing every value from every input list. Lists are represented as Python arrays for grading; an empty list represents an empty linked list.
def merge_k_lists(lists):