Why not just do this?


  • 0
    Y

    So, instead of doing all these recursive solutions and what not, why not simply traverse each of the two linked lists first and compute the actual integer value of each. We then add the two integers, which is O(1). We can then simply construct the final linked list based on the sum. Wouldn't it be much simpler and just as efficient?


Log in to reply
 

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