Skip to content

Instantly share code, notes, and snippets.

@rugbyprof
Last active September 14, 2024 06:37
Show Gist options
  • Save rugbyprof/a6d2a0c507d621fe783cce41222601fd to your computer and use it in GitHub Desktop.
Save rugbyprof/a6d2a0c507d621fe783cce41222601fd to your computer and use it in GitHub Desktop.
list traversal
void LinkedList::print() {
Node *travel = front; // Line 1
while (travel) { // Line 2
// do stuff here
travel = travel->next; // Line 3
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment