Back to Javascript Algorithms

Linked List Traversal

src/algorithms/linked-list/traversal/README.md

latest570 B
Original Source

Linked List Traversal

Read this in other languages: Русский, 中文, Português

The task is to traverse the given linked list in straight order.

For example for the following linked list:

The order of traversal should be:

text
12 → 99 → 37

The time complexity is O(n) because we visit every node only once.

Reference