...number of nodes, say 2k, into tw? Write a function ListSplit that will split a circular list containing an even number of nodes, say 2k, into two circular lists each of which contains k nodes. The function should have three parameters and should work so that the function call
ListSplit(list,sub1,sub2);
will create new lists linked to by parameters sub1, and sub2 from the list initially referenced by parameter list. After ListSplit has executed, the first parameter should be 0/NULL, i.e., new nodes are not created, but are redistributed evenly between the second and third parameters. It doesn't matter how you divide the nodes between the two lists. Note that you should make no assumptions about the values of first and second in the body of ListSplit.