My Docs
BlogGithubLinkedin
Data Structures & Algorithms
Data Structures & Algorithms
  • Data Structures & Algorithms
  • trees
    • 🌳Trees
    • Page 1
      • Breadth-First Search (BFS)
  • 🕸️Graph
    • Graphs
    • ⛓️Linked List
    • Binary Search
    • Linear Search
Powered by GitBook
On this page
  • Linked List Traversal
  • Reference

Was this helpful?

Edit on GitHub
  1. Graph

Linked List

PreviousGraphsNextBinary Search

Last updated 3 years ago

Was this helpful?

Linked List Traversal

Read this in other languages: Русский

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

For example for the following linked list:

Singly 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

🕸️
⛓️
Wikipedia