[
^ to index...
|
<-- previous
|
next -->
]
Linked list operations: length
int LinkedList::length() { ListNode * cursor = head; int count = 0; while (cursor != NULL) { cursor = cursor->next; count++; } return count; }
Last modified: Wed Jul 12 19:32:52 PDT 2000