Which of the following sequences of code could be used in the destructor ~List() to correctly delete all of the nodes in the list? (Which ones are legal, even if the style is atrocious?)
I. for (ListNode *n = head; head != NULL; head = n) { n = head->next; delete head; }
II. for (ListNode *n = head; n != NULL; n->next) { delete n; }
III. ListNode* n; while (head != NULL) { n = head->next; delete head; head = n; }