The problem's description is ambgious


  • 0
    Q

    Just reading the problem's description, I can not figure out what does the sorted linked list mean? Are both l1 and l2 ascend or descend order, or one is ascend order, another is descend order. I spent a lot of time to pass the test case below:

    int main(int argc, char *argv[])
    {
    	struct ListNode n4 = {4, NULL};
    	struct ListNode n3 = {3, &n4};
    	struct ListNode n2 = {1, &n3};
    
    	struct ListNode n7 = {2, NULL};
    	struct ListNode n1 = {7, &n7};
    
    	printList(mergeTwoLists(&n2, &n1));
        return 0;
    }

  • 0
    W

    You thought too much~


  • 0
    Z

    ME TOO!!!
    It's nothing but all tears T=T


Log in to reply
 

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