Skip to content

Resource · Guide or article

Reversed Linked List Traversal

Poses the task of visiting a singly linked list from tail to head, with one three-node example. A quick prompt for practicing recursion or stack-based traversal.

Reviewed

Open the original: Reversed Linked List Traversal (opens the original site in a new tab)

Practice this topicOpens the practice interviewer in Technical / coding mode; choose a question there.

Add to a roadmap

Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.

Source content: English

Read this in other languages: 中文, Português The task is to traverse the given linked list in reversed order. For example for the following linked list:

PrepKit overview

PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.

Suited to
The source does not state a level
Format
Reference

What it covers

  • Expected reversed output 37, 99, 12 for the pictured list
  • Time complexity stated as O(n), since each node is visited once

How to use it

PrepKit study advice, not a claim made by the source.

Solve it three ways: recursion, an explicit stack, and reversing the list in place and then walking it. State the extra space each approach uses and print 37, 99, 12 from all three.

Scope and limitations

Only a task statement and an example. It does not explain any method for reversing the order, space use or recursion depth; the single reference is Wikipedia.

Access and format

Free English README on GitHub in the MIT-licensed trekhleb/javascript-algorithms repository.

Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88

Evidence behind this overview
  • src/algorithms/linked-list/reverse-traversal/README.md

Pages that include this

Get the PrepKit newsletter

Optional. You don't need it to use PrepKit.

How we handle your email