Answer:
while list1 not empty AND list2 not empty {
if elements at leftmost positions are equal {
pop element from list1
pop element from list2
add element to result_list
} else {
pop lowest value from list1 or list2
}
4.5m questions
5.8m answers