def test3(Solution): lists = [[]] assert list2arr(Solution().mergeKLists(lists)) == []
def test3(Solution): assert list2arr(Solution().addTwoNumbers(arr2list([9,9,9,9,9,9,9]), arr2list([9,9,9,9]))) == [8,9,9,9,0,0,0,1]
def test1(Solution): lists = [[1, 4, 5], [1, 3, 4], [2, 6]] li = [] for l in lists: li.append(arr2list(l)) assert list2arr(Solution().mergeKLists(li)) == [1, 1, 2, 3, 4, 4, 5, 6]
def test1(Solution): assert list2arr(Solution().addTwoNumbers(arr2list([2,4,3]), arr2list([5,6,4]))) == [7,0,8]
def test2(Solution): assert list2arr(Solution().addTwoNumbers(arr2list([0]), arr2list([0]))) == [0]
def test1(Solution): arr = [1, 2, 3, 4, 5] assert list2arr(Solution().reverseList(arr2list(arr))) == [5, 4, 3, 2, 1]
def test4(Solution): assert list2arr(Solution().oddEvenList(arr2list([1, 2]))) == [1, 2]
def test3(Solution): assert list2arr(Solution().oddEvenList(arr2list([]))) == []
def test2(Solution): assert list2arr(Solution().oddEvenList(arr2list( [1, 2, 3, 4, 5, 6]))) == [1, 3, 5, 2, 4, 6]
def test1(Solution): l1 = arr2list([1, 2, 4]) l2 = arr2list([1, 3, 4]) assert list2arr(Solution().mergeTwoLists(l1, l2)) == [1, 1, 2, 3, 4, 4]