Hello,
I was trying to write a program for the problem I mentioned above, the numbers (i.e the lists) can be of unequal length, I was not able to figure out a way to do this other than the most commonly thought of approach i.e
- reverse list-1
- reverse list-2
- find the sum and store it in a new list represented by list-3
- reverse the list.
The complexity of this should be of the O(n+m). Is there anyway to reduce it, or do it better?