Method 1: Add one list into the other list. For example, if list1is {22, 33, 44, 55} and list2 is {66, 77, 88, 99},then append(list1, list2)will change list1to {22, 33, 44, 55, 44, 66, 77, 88, 99}. static void append(Node list1, Node list2) { if (li…