File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
src/algorithms/linked-list/traversal Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 11# Linked List Traversal
22
3+ _ Read this in other languages:_
4+ [ _ Русский_ ] ( README.ru-RU.md )
5+
36The task is to traverse the given linked list in straight order.
47
5- For example for the following linked list:
8+ For example for the following linked list:
69
710![ ] ( https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg )
811
Original file line number Diff line number Diff line change 1+ # Обход связного списка
2+
3+ Задача состоит в том, чтобы обойти связный список в прямом порядке.
4+
5+ Например, для следующего связного списка:
6+
7+ ![ ] ( https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg )
8+
9+ Порядок обхода будет такой:
10+
11+ ``` text
12+ 12 → 99 → 37
13+ ```
14+
15+ Временная сложность - ` O(n) ` , потому что мы посещаем каждый узел только один раз.
16+
17+ ## Ссылки
18+
19+ - [ Wikipedia] ( https://ru.wikipedia.org/wiki/%D0%A1%D0%B2%D1%8F%D0%B7%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA )
You can’t perform that action at this time.
0 commit comments