Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 225 Bytes

File metadata and controls

7 lines (6 loc) · 225 Bytes

Because the given two lists are in order, we need to look at them in a reversed order.
We can put all them in to the stack.
add them with the same way as before, and reverse it.

time: O(m + n)
space: O(m + n)