/* title: replication of complex linked lists. struct complexlistnode{ int m_vlaue; Complexlistnode *m_next; Complexlistnode *m_psibling;} , M_next, connects to the next node, m_psibling links to other nodes. This makes it difficult to replicate nodes, and it is not possible to solve them all at once. Strategy: The first method: first Copy the linked list, let M_pnext connect the nodes together. The second round is copying another pointer, the complexity of O (n*n); The second method: first copy the linked list, then space for time, with an O (n) long hash table to store the data, order to save the corresponding pointer. Save the M_psibling pointer, and then the second change in the loop is possible. the Third Kind: the algorithm that does not join the auxiliary space. (1): In order to create a linked list one, and connected to the previous node for example: Start the list for ABCDEFG, after the creation of the AABBCCDDEEFFGG. (2): Here for example, if a points to C. So it must be a point C. So, a points to the next of C. after traversal, point to the next node where the node points to the node. (3): The Separation chain list, in fact, is the odd-even analysis! Starting from 0, the even number is the academician linked list, odd is the clone linked list. */
19--the replication of complex linked lists.