@@ -10,7 +10,9 @@ Each algorithm and data structure have its own separate README
10
10
with related explanations and links for further reading and YouTube
11
11
videos.
12
12
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 )
14
16
15
17
## Data Structures
16
18
@@ -68,6 +70,7 @@ a set of rules that precisely defines a sequence of operations.
68
70
* [ Rabin Karp Algorithm] ( https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/string/rabin-karp ) - substring search
69
71
* [ Longest Common Substring] ( https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/string/longest-common-substring )
70
72
* ** Search**
73
+ * [ Linear Search] ( https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/search/linear-search )
71
74
* [ Binary Search] ( https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/search/binary-search )
72
75
* ** Sorting**
73
76
* [ 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
199
202
200
203
### Data Structure Operations Complexity
201
204
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) | |
213
216
214
217
### Array Sorting Algorithms Complexity
215
218
0 commit comments