Skip to content

Files

Latest commit

63f5a27 · Jul 26, 2020

History

History
This branch is 3 commits ahead of, 232 commits behind trekhleb/javascript-algorithms:master.

reverse-traversal

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Reversed Linked List Traversal

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

For example for the following linked list:

The order of traversal should be:

37 → 99 → 12

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

Reference