v1 time O(n) space O(1) Accepted

n = max(len(l1), len(l2))
constant EXTRA mem used