Question about python input.


  • 0
    I

    Python solution give this hint as input type

            """
            :type lists: List[ListNode]
            :rtype: ListNode
            """
    

    but the test input has an example: [ [ ] ]
    I don't understand why there is a [] in a [], I think it should be [ ListNode1, ListNode2 ... ] at least it should not be [] but a None, or ListNode is an object like:

    # Definition for singly-linked list.
    # class ListNode(object):
    #     def __init__(self, x):
    #         self.val = x
    #         self.next = None
    

    Am I misunderstand something?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.