14 Node * current = head;
15 while (current != NULL)
18 cout << current->
info <<
" -> ";
19 current = current->
next;
25 Node * & tail,
int num)
44 for (
Node * current = head; current != NULL; current = current->
next)
59 Node * current = head;
60 for (
int i = 0; i < len; ++i)
61 current = current->
next;
64 second = current->
next;
71 Node * head = NULL, * tail = NULL;
75 cout <<
"input integers (-999 to end): ";
77 while ( num != -999 ) {
void tail_insert(Node *&head, Node *&tail, int num)
int list_length(Node *head)
void print_list(Node *head)
void divide(Node *&head, Node *&second)