Cuperman has a machine which can travel among different planets. ItakEjgo used this machine and arrived the Linked List Planet. Linked List Planet was controlled by an evil guy “Huang Bo”, who raises hard problems to the island citizens, and forces them to write programs to solve. The planet citizens want to fight against Huang Bo. However, do that is not so easy, so they asked help from ItakeEjgo. The exact request is:
They have two branches of soldiers. In each branch, the soldiers are in an ordered (i.e., non-decreasing) list by their combat values. However, it only has one way to reach Huang Bo’s castle. Then, they need combine two soldier lists to one army list. They hope the army list is still ordered.
However, ItakEjgo do not know how to solve it by linked list. Fortunately, ItakEjgo knows that you are learning linked list in CS203. So ItakEjgo asks you for help!!! Each time, ItakEjgo will give you two ordered soldiers list, and you must return the army list to him after combination.