You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a full list of all the exposed data structures and algorithms [see](https://github.com/amejiarosario/dsa.js/blob/master/src/index.js).
68
+
For a full list of all the exposed data structures and algorithms [see](src/index.js).
69
69
70
70
71
71
## Features
@@ -89,15 +89,15 @@ This material is going to teach you to:
89
89
90
90
## What's Inside
91
91
92
-
All the code and explanations are available on this repo. You can dig through the links and code examples from the ([src folder](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/tree/master/src)). However, the inline code examples are not expanded (because of Github's asciidoc limitations) but you can follow the path and see the implementation.
92
+
All the code and explanations are available on this repo. You can dig through the links and code examples from the ([src folder](src)). However, the inline code examples are not expanded (because of Github's asciidoc limitations) but you can follow the path and see the implementation.
93
93
94
94
_Note: If you prefer to consume the information in a more linear fashion then the [book format](https://books.adrianmejia.com/dsajs-data-structures-algorithms-javascript/) would be more appropriate for you._
95
95
96
96
The topics are divided in 4 main categories as you can see below:
<!-- - Computer Science nuggets without all the mumbo-jumbo.
103
103
- Learn how to compare algorithms using Big O notation.
@@ -112,11 +112,11 @@ _(You can click on the ⯈ to expand the topics)_
112
112
113
113
---
114
114
115
-
### [Computer Science nuggets without all the mumbo-jumbo](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part01/algorithms-analysis.asc)
115
+
### [Computer Science nuggets without all the mumbo-jumbo](book/content/part01/algorithms-analysis.asc)
116
116
117
117
#### Learn to calculate run time from code examples
118
118
119
-

119
+

120
120
121
121
---
122
122
@@ -129,16 +129,16 @@ _(You can click on the ⯈ to expand the topics)_
129
129
130
130
---
131
131
132
-
### [Learn how to compare algorithms using Big O notation.](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part01/big-o-examples.asc#finding-if-an-array-is-empty)
132
+
### [Learn how to compare algorithms using Big O notation.](book/content/part01/big-o-examples.asc#finding-if-an-array-is-empty)
133
133
134
134
#### Comparing algorithms using Big O notation
135
135
136
136
Let's say you want to find the duplicates on an array.
137
137
Using Big O notation we can compare different implementations that do exactly the same but
138
138
they take different time to complete.
139
139
140
-
-[Optimal solution using a map](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part01/big-o-examples.asc#linear-example)
141
-
-[Finding duplicates in an array (naïve approach)](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part01/big-o-examples.asc#quadratic-example)
140
+
-[Optimal solution using a map](book/content/part01/big-o-examples.asc#linear-example)
141
+
-[Finding duplicates in an array (naïve approach)](book/content/part01/big-o-examples.asc#quadratic-example)
142
142
143
143
---
144
144
@@ -151,11 +151,11 @@ they take different time to complete.
151
151
152
152
---
153
153
154
-
[8 examples to explain with code how to calculate time complexity](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part01/big-o-examples.asc#summary)
154
+
[8 examples to explain with code how to calculate time complexity](book/content/part01/big-o-examples.asc#summary)
@@ -168,14 +168,14 @@ they take different time to complete.
168
168
169
169
#### Time complexity graph
170
170
171
-

171
+

172
172
173
173
---
174
174
175
175
</details>
176
176
</blockquote>
177
177
178
-
### 🥞 [Linear Data Structures](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part02-linear-data-structures.asc)
178
+
### 🥞 [Linear Data Structures](book/part02-linear-data-structures.asc)
179
179
180
180
<!-- - Understand the ins and outs of the most common data structures.
181
181
- When to use an Array or Linked List. Know the tradeoffs.
@@ -190,29 +190,29 @@ they take different time to complete.
190
190
191
191
---
192
192
193
-
#### [Understand the ins and outs of the most common data structures](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part02-linear-data-structures.asc)
193
+
#### [Understand the ins and outs of the most common data structures](book/part02-linear-data-structures.asc)
194
194
195
195
196
-
-[Arrays](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part02/array.asc): Built-in in most languages so not implemented here. [Array Time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/content/part02/array.asc#array-complexity)
196
+
-[Arrays](book/content/part02/array.asc): Built-in in most languages so not implemented here. [Array Time complexity](book/content/part02/array.asc#array-complexity)
-[Linked List](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part02/linked-list.asc): each data node has a link to the next (and
199
+
-[Linked List](book/content/part02/linked-list.asc): each data node has a link to the next (and
[Linked List Time Complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/content/part02/linked-list.asc#linked-list-complexity-vs-array-complexity)
203
+
[Linked List Time Complexity](book/content/part02/linked-list.asc#linked-list-complexity-vs-array-complexity)
-[Queue](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part02/queue.asc): data flows in a "first-in, first-out" (FIFO) manner.
-[Stack](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part02/stack.asc): data flows in a "last-in, first-out" (LIFO) manner.
@@ -225,7 +225,7 @@ they take different time to complete.
225
225
226
226
---
227
227
228
-
#### [When to use an Array or Linked List. Know the tradeoffs](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part02/array-vs-list-vs-queue-vs-stack.asc)
228
+
#### [When to use an Array or Linked List. Know the tradeoffs](book/content/part02/array-vs-list-vs-queue-vs-stack.asc)
229
229
230
230
Use Arrays when…
231
231
- You need to access data in random order fast (using an index).
@@ -246,19 +246,19 @@ Use Linked Lists when:
246
246
247
247
---
248
248
249
-
#### [Build a List, Stack and a Queue from scratch](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part02-linear-data-structures.asc)
249
+
#### [Build a List, Stack and a Queue from scratch](book/part02-linear-data-structures.asc)
### 🌲 [Non-Linear Data Structures](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part03-graph-data-structures.asc)
261
+
### 🌲 [Non-Linear Data Structures](book/part03-graph-data-structures.asc)
262
262
<!-- - Understand one of the most versatile data structure of all: Maps -->
263
263
<!-- - Know the properties of Graphs and Trees. -->
264
264
<!-- - Implement a binary search tree for fast lookups. -->
Also, [learn the difference between the different Maps implementations](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part03/time-complexity-graph-data-structures.asc):
280
+
Also, [learn the difference between the different Maps implementations](book/content/part03/time-complexity-graph-data-structures.asc):
281
281
282
282
-`HashMap` is more time-efficient. A `TreeMap` is more space-efficient.
283
283
-`TreeMap` search complexity is *O(log n)*, while an optimized `HashMap` is *O(1)* on average.
@@ -296,60 +296,60 @@ Also, [learn the difference between the different Maps implementations](https://
296
296
297
297
---
298
298
299
-
#### [Know the properties of Graphs and Trees](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part03-graph-data-structures.asc)
299
+
#### [Know the properties of Graphs and Trees](book/part03-graph-data-structures.asc)
Know all the graphs properties with many images and illustrations.
304
304
305
-

305
+

306
306
307
307
**Graphs**: data **nodes** that can have a connection or **edge** to
308
308
zero or more adjacent nodes. Unlike trees, nodes can have multiple
Learn all the different kinds of trees and its properties.
317
317
318
-

318
+

319
319
320
320
-**Trees**: data nodes has zero or more adjacent nodes a.k.a.
321
321
children. Each node can only have one parent node otherwise is a
@@ -362,12 +362,12 @@ Learn all the different kinds of trees and its properties.
362
362
363
363
---
364
364
365
-
#### [Implement a binary search tree for fast lookups](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part03/binary-search-tree.asc)
365
+
#### [Implement a binary search tree for fast lookups](book/content/part03/binary-search-tree.asc)
366
366
367
367
- Learn how to add/remove/update values in a tree:
368
-

368
+

369
369
370
-
-[How to make a tree balanced?](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/B-self-balancing-binary-search-trees.asc)
370
+
-[How to make a tree balanced?](book/B-self-balancing-binary-search-trees.asc)
371
371
372
372
From unbalanced BST to balanced BST
373
373
```
@@ -384,7 +384,7 @@ From unbalanced BST to balanced BST
<!-- - Never get stuck solving a problem with 7 simple steps. -->
390
390
<!-- - Master the most popular sorting algorithms (mergesort, quicksort, insertion sort, ...) -->
@@ -398,7 +398,7 @@ From unbalanced BST to balanced BST
398
398
399
399
---
400
400
401
-
#### [Never get stuck solving a problem with 7 simple steps](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part04-algorithmic-toolbox.asc)
401
+
#### [Never get stuck solving a problem with 7 simple steps](book/part04-algorithmic-toolbox.asc)
402
402
403
403
1. Understand the problem
404
404
1. Build a simple example (no edge cases yet)
@@ -408,7 +408,7 @@ From unbalanced BST to balanced BST
408
408
1. Write Code, yes, now you can code.
409
409
1. Test your written code
410
410
411
-
Full details [here](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part04-algorithmic-toolbox.asc)
411
+
Full details [here](book/part04-algorithmic-toolbox.asc)
412
412
413
413
---
414
414
@@ -420,34 +420,34 @@ Full details [here](https://github.com/amejiarosario/dsa.js-data-structures-and-
420
420
421
421
---
422
422
423
-
#### [Master the most popular sorting algorithms](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part04/sorting-algorithms.asc)
423
+
#### [Master the most popular sorting algorithms](book/content/part04/sorting-algorithms.asc)
424
424
425
425
We are going to explore three basic sorting algorithms O(n2) which have low overhead:
@@ -459,13 +459,13 @@ and then discuss efficient sorting algorithms O(n log n) such as:
459
459
460
460
---
461
461
462
-
#### [Learn different approaches to solve algorithmic problems](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/part04-algorithmic-toolbox.asc)
462
+
#### [Learn different approaches to solve algorithmic problems](book/part04-algorithmic-toolbox.asc)
463
463
464
464
We are going to discuss the following techniques for solving algorithms problems:
465
-
-[Greedy Algorithms](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/bbook/content/part04/greedy-algorithms.asc): makes greedy choices using heuristics to find the best solution without looking back.
466
-
-[Dynamic Programming](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part04/dynamic-programming.asc): a technique for speeding up recursive algorithms when there are many _overlapping subproblems_. It uses _memoization_ to avoid duplicating work.
467
-
-[Divide and Conquer](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part04/divide-and-conquer.asc): _divide_ problems into smaller pieces, _conquer_ each subproblem and then _join_ the results.
468
-
-[Backtracking](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/content/part04/backtracking.asc): search _all (or some)_ possible paths. However, it stops and _go back_ as soon as notice the current solution is not working.
465
+
-[Greedy Algorithms](book/content/part04/greedy-algorithms.asc): makes greedy choices using heuristics to find the best solution without looking back.
466
+
-[Dynamic Programming](book/content/part04/dynamic-programming.asc): a technique for speeding up recursive algorithms when there are many _overlapping subproblems_. It uses _memoization_ to avoid duplicating work.
467
+
-[Divide and Conquer](book/content/part04/divide-and-conquer.asc): _divide_ problems into smaller pieces, _conquer_ each subproblem and then _join_ the results.
468
+
-[Backtracking](book/content/part04/backtracking.asc): search _all (or some)_ possible paths. However, it stops and _go back_ as soon as notice the current solution is not working.
469
469
-_Brute Force_: generate all possible solutions and tries all of them. (Use it as a last resort or as the starting point to optimize it with other techniques).
470
470
471
471
---
@@ -515,4 +515,4 @@ The best way to support this project is buying the [book](https://books.adrianme
0 commit comments