This is a programming question asked during a written test for an interview. \"You have two singly linked lists that are already sorted, you have to merge them and return a
Here is the algorithm on how to merge two sorted linked lists A and B:
while A not empty or B not empty:
if first element of A < first element of B:
remove first element from A
insert element into C
end if
else:
remove first element from B
insert element into C
end while
Here C will be the output list.