A new list to save result,or just use l1?


  • 0
    C

    When I saw this question,I tried to use l1 iself to save results.As a result,I have to consider many conditions,such as l1 is shorter than l2,then I have to make l2 connects to l1.After AC,I have read some other people's method,while I found most of people make a new list to save the result,and they will try to make a ListNode during the calculation.I am a new one,I am really curious to two methods,which one is better or which one should be used ?


Log in to reply
 

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