Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
K-way merge
Sign in to test your solution.
def mergeA(lijsten: list):
"""
>>> mergeA([[1, 3, 5], [0, 2, 4], [1, 8, 9, 10, 11]])
[0, 1, 1, 2, 3, 4, 5, 8, 9, 10, 11]
>>> mergeA([[1, 10, 20, 100], [99, 101, 200, 400], []])
[1, 10, 20, 99, 100, 101, 200, 400]
"""
pass
def mergeB(lijsten: list):
"""
>>> mergeB([[1, 3, 5], [0, 2, 4], [1, 8, 9, 10, 11]])
[0, 1, 1, 2, 3, 4, 5, 8, 9, 10, 11]
>>> mergeB([[1, 10, 20, 100], [99, 101, 200, 400], []])
[1, 10, 20, 99, 100, 101, 200, 400]
"""
pass
import heapq
def mergeC(lijsten: list):
"""
>>> mergeC([[1, 3, 5], [0, 2, 4], [1, 8, 9, 10, 11], []])
[0, 1, 1, 2, 3, 4, 5, 8, 9, 10, 11]
>>> mergeC([[1, 10, 20, 100], [99, 101, 200, 400]])
[1, 10, 20, 99, 100, 101, 200, 400]
"""
pass