Write an algorithm to split a circular linked list two linked list with equal no of nodes
Anónimo
//first points to start if the list void circular_to_list(struct node *first, struct node *second) { struct node *head, struct node *temp; head = first; second = head; first = head; do { first = first->next; if(first == temp) break; first = first->temp; second = second->next; }while(first != temp); //first is pointing to head of list //second is point to mid of the list temp = first; first = first->next; temp->next = NULL; temp = second; second = second->next; second->next = NULL; }