Skip to content

Files

Latest commit

80ecbe0 · Sep 8, 2018

History

History
This branch is up to date with phamtuanit/javascript-algorithms:master.

reverse-traversal

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