mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Add Chinese Translation (#815)
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
This commit is contained in:
parent
53781db275
commit
dd3cbe1bfd
@ -1,5 +1,8 @@
|
|||||||
# Reversed Linked List Traversal
|
# Reversed Linked List Traversal
|
||||||
|
|
||||||
|
_Read this in other languages:_
|
||||||
|
[中文](README.zh-CN.md)
|
||||||
|
|
||||||
The task is to traverse the given linked list in reversed order.
|
The task is to traverse the given linked list in reversed order.
|
||||||
|
|
||||||
For example for the following linked list:
|
For example for the following linked list:
|
||||||
|
19
src/algorithms/linked-list/reverse-traversal/README.zh-CN.md
Normal file
19
src/algorithms/linked-list/reverse-traversal/README.zh-CN.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 链表倒序遍历
|
||||||
|
|
||||||
|
我们的任务是倒序遍历给定的链表
|
||||||
|
|
||||||
|
比如下面的链表
|
||||||
|
|
||||||
|
![](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)
|
||||||
|
|
||||||
|
遍历的顺序应该是
|
||||||
|
|
||||||
|
```text
|
||||||
|
37 → 99 → 12
|
||||||
|
```
|
||||||
|
|
||||||
|
因为我们每个节点只访问一次,时间复杂度应该是`O(n)`
|
||||||
|
|
||||||
|
## 参考
|
||||||
|
|
||||||
|
- [Wikipedia](https://zh.wikipedia.org/wiki/%E9%93%BE%E8%A1%A8)
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
_Read this in other languages:_
|
_Read this in other languages:_
|
||||||
[_Русский_](README.ru-RU.md)
|
[_Русский_](README.ru-RU.md)
|
||||||
|
[中文](README.zh-CN.md)
|
||||||
|
|
||||||
The task is to traverse the given linked list in straight order.
|
The task is to traverse the given linked list in straight order.
|
||||||
|
|
||||||
|
19
src/algorithms/linked-list/traversal/README.zh-CN.md
Normal file
19
src/algorithms/linked-list/traversal/README.zh-CN.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 链表遍历
|
||||||
|
|
||||||
|
我们的任务是顺序遍历给定的链表
|
||||||
|
|
||||||
|
比如下面的链表
|
||||||
|
|
||||||
|
![Singly linked list](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)
|
||||||
|
|
||||||
|
遍历的顺序应该是
|
||||||
|
|
||||||
|
```text
|
||||||
|
12 → 99 → 37
|
||||||
|
```
|
||||||
|
|
||||||
|
因为我们每个节点只访问一次,时间复杂度应该是`O(n)`
|
||||||
|
|
||||||
|
## 参考
|
||||||
|
|
||||||
|
- [Wikipedia](https://zh.wikipedia.org/wiki/%E9%93%BE%E8%A1%A8)
|
Loading…
Reference in New Issue
Block a user