Is this your company?
How to merge two sorted linked list
Anonymous
There are two sorted linked list a and b. Create two dummy linked list, c and temp. Make temp = c, Generate a loop from 0 to the size of a and b, If a.val > b.val, c point to b and b = b.next, If a.val < b.val, c point to a and a = a.next, If a.val = b.val, c point to a and then b, increase a and b to the next node. After the loop is end, return temp
Check out your Company Bowl for anonymous work chats.