javascript-algorithms/src/algorithms/linked-list/traversal at master · sksz/javascript-algorithms · GitHub
Skip to content

Latest commit

 

History

History
 
 

traversal

Folders and files

README.md

Linked List Traversal

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:

12 → 99 → 37

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

Reference