Skip to content

Commit da07dec

Browse files
committed
MERGE
2 parents 99eac6f + 4537416 commit da07dec

File tree

6 files changed

+306
-12
lines changed

6 files changed

+306
-12
lines changed

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Each algorithm and data structure have its own separate README
1010
with related explanations and links for further reading and YouTube
1111
videos.
1212

13-
_Read this in other languages:_ [简体中文](https://github.com/trekhleb/javascript-algorithms/blob/master/README.zh-CN.md)
13+
_Read this in other languages:_
14+
[简体中文](https://github.com/trekhleb/javascript-algorithms/blob/master/README.zh-CN.md),
15+
[繁體中文](https://github.com/trekhleb/javascript-algorithms/blob/master/README.zh-TW.md)
1416

1517
## Data Structures
1618

@@ -68,6 +70,7 @@ a set of rules that precisely defines a sequence of operations.
6870
* [Rabin Karp Algorithm](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/string/rabin-karp) - substring search
6971
* [Longest Common Substring](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/string/longest-common-substring)
7072
* **Search**
73+
* [Linear Search](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/search/linear-search)
7174
* [Binary Search](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/search/binary-search)
7275
* **Sorting**
7376
* [Bubble Sort](https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/sorting/bubble-sort)
@@ -199,17 +202,17 @@ Below is the list of some of the most used Big O notations and their performance
199202

200203
### Data Structure Operations Complexity
201204
202-
| Data Structure | Access | Search | Insertion | Deletion |
203-
| ----------------------- | :-------: | :-------: | :-------: | :-------: |
204-
| **Array** | 1 | n | n | n |
205-
| **Stack** | n | n | 1 | 1 |
206-
| **Queue** | n | n | 1 | 1 |
207-
| **Linked List** | n | n | 1 | 1 |
208-
| **Hash Table** | - | n | n | n |
209-
| **Binary Search Tree** | n | n | n | n |
210-
| **B-Tree** | log(n) | log(n) | log(n) | log(n) |
211-
| **Red-Black Tree** | log(n) | log(n) | log(n) | log(n) |
212-
| **AVL Tree** | log(n) | log(n) | log(n) | log(n) |
205+
| Data Structure | Access | Search | Insertion | Deletion | Comments |
206+
| ----------------------- | :-------: | :-------: | :-------: | :-------: | :-------- |
207+
| **Array** | 1 | n | n | n | |
208+
| **Stack** | n | n | 1 | 1 | |
209+
| **Queue** | n | n | 1 | 1 | |
210+
| **Linked List** | n | n | 1 | 1 | |
211+
| **Hash Table** | - | n | n | n | In case of perfect hash function costs would be O(1) |
212+
| **Binary Search Tree** | n | n | n | n | In case of balanced tree costs would be O(log(n)) |
213+
| **B-Tree** | log(n) | log(n) | log(n) | log(n) | |
214+
| **Red-Black Tree** | log(n) | log(n) | log(n) | log(n) | |
215+
| **AVL Tree** | log(n) | log(n) | log(n) | log(n) | |
213216

214217
### Array Sorting Algorithms Complexity
215218

README.zh-CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
每种算法和数据结构都有自己的 README 并提供相关说明以及进一步阅读和 YouTube 视频。
99

10+
_Read this in other languages:_
11+
[_English_](https://github.com/trekhleb/javascript-algorithms/),
12+
[繁體中文](https://github.com/trekhleb/javascript-algorithms/blob/master/README.zh-TW.md)
13+
1014
## 数据结构
1115

1216
数据结构是在计算机中组织和存储数据的一种特殊方式,它可以高效地访问和修改数据。更确切地说,数据结构是数据值的集合,它们之间的关系、函数或操作可以应用于数据。

0 commit comments

Comments
 (0)