I was asked this question in an interview.
For example, if given list1: 1,1,2,4,5,7 and list2: 1,3,5,8 we should return a list3: 2,4,7.
The problem requires constant space, and we need to reduce the time complexity as much as possible.
I was asked this question in an interview.
For example, if given list1: 1,1,2,4,5,7 and list2: 1,3,5,8 we should return a list3: 2,4,7.
The problem requires constant space, and we need to reduce the time complexity as much as possible.