Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6b53d04

Browse files
update repo name
1 parent 15c3877 commit 6b53d04

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

‎book/chapters/linked-list.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Searching by index is very similar, we iterate through the list until we find th
9898
include::{codedir}/data-structures/linked-lists/linked-list.js[tag=searchByIndex, indent=0]
9999
----
100100

101-
If there’s no match, we return `undefined` then. The runtime is _O(n)_. As you might notice the search by index and by position methods looks pretty similar. If you want to take a look at the whole implementation https://github.com/amejiarosario/algorithms.js/blob/7694c20d13f6c53457ee24fbdfd3c0ac57139ff4/src/data-structures/linked-lists/linked-list.js#L8[click here].
101+
If there’s no match, we return `undefined` then. The runtime is _O(n)_. As you might notice the search by index and by position methods looks pretty similar. If you want to take a look at the whole implementation https://github.com/amejiarosario/dsa.js/blob/7694c20d13f6c53457ee24fbdfd3c0ac57139ff4/src/data-structures/linked-lists/linked-list.js#L8[click here].
102102

103103
== Insertion
104104

‎book/chapters/map-hashmap.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ include::{codedir}/data-structures/maps/hash-maps/hash-map.js[tag=rehash, indent
264264
----
265265

266266
In the
267-
https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/hash-maps/primes.js[prime.js] file you can find the implementation for finding the next prime. Also, you can see the full HashMap implementation on this file: https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/hash-maps/hashmap.js[hashmap.js]
267+
https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/hash-maps/primes.js[prime.js] file you can find the implementation for finding the next prime. Also, you can see the full HashMap implementation on this file: https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/hash-maps/hashmap.js[hashmap.js]
268268

269269
== HashMap time complexity
270270

‎book/chapters/map-treemap.adoc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ For inserting a value on a TreeMap, we first need to inialize the tree:
3636
include::{codedir}/data-structures/maps/tree-maps/tree-map.js[tag=constructor, indent=0]
3737
----
3838

39-
The tree can be an instance of any Binary Search Tree that we implemented so far. However, for better performance, it should be a self-balanced tree like a https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/red-black-tree.js[Red-Black Tree] or https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/avl-tree.js[AVL Tree].
39+
The tree can be an instance of any Binary Search Tree that we implemented so far. However, for better performance, it should be a self-balanced tree like a https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/trees/red-black-tree.js[Red-Black Tree] or https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/trees/avl-tree.js[AVL Tree].
4040

4141

4242
Let's implement the method to add values to the tree.
@@ -85,4 +85,4 @@ include::{codedir}/data-structures/maps/tree-maps/tree-map.js[tag=delete, indent
8585

8686
The BST implementation does all the heavy lifting.
8787

88-
That’s it! To see the full file in context, click here: https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js[here]
88+
That’s it! To see the full file in context, click here: https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js[here]

‎book/chapters/map.adoc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ include::{codedir}/data-structures/maps/hash-maps/hash-map.js[tag=rehash, indent
291291
----
292292

293293
In the
294-
https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/hash-maps/primes.js[prime.js] file you can find the implementation for finding the next prime. Also, you can see the full HashMap implementation on this file: https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/hash-maps/hashmap.js[hashmap.js]
294+
https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/hash-maps/primes.js[prime.js] file you can find the implementation for finding the next prime. Also, you can see the full HashMap implementation on this file: https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/hash-maps/hashmap.js[hashmap.js]
295295

296296
== HashMap time complexity
297297

@@ -344,7 +344,7 @@ For inserting a value on a TreeMap, we first need to inialize the tree:
344344
include::{codedir}/data-structures/maps/tree-maps/tree-map.js[tag=constructor, indent=0]
345345
----
346346

347-
The tree can be an instance of any Binary Search Tree that we implemented so far. However, for better performance, it should be a self-balanced tree like a https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/red-black-tree.js[Red-Black Tree] or https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/avl-tree.js[AVL Tree].
347+
The tree can be an instance of any Binary Search Tree that we implemented so far. However, for better performance, it should be a self-balanced tree like a https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/trees/red-black-tree.js[Red-Black Tree] or https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/trees/avl-tree.js[AVL Tree].
348348

349349

350350
Let's implement the method to add values to the tree.
@@ -393,7 +393,7 @@ include::{codedir}/data-structures/maps/tree-maps/tree-map.js[tag=delete, indent
393393

394394
The BST implementation does all the heavy lifting.
395395

396-
That’s it! To see the full file in context, click here: https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js[https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js]
396+
That’s it! To see the full file in context, click here: https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js[https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js]
397397

398398

399399
== TreeMap Time complexity vs HashMap

‎book/chapters/set.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Array.from(set); //↪️ (4) [1, 2, 3, 5]
140140

141141
No more duplicates in our array!
142142

143-
Check out our https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/sets/tree-set.js[GitHub repo for the full TreeSet implementation].
143+
Check out our https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/sets/tree-set.js[GitHub repo for the full TreeSet implementation].
144144

145145
Let’s now, implement a `HashSet`.
146146

‎book/chapters/stack.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Deleting is straightforward as well.
4747
include::{codedir}/data-structures/stacks/stack.js[tag=remove, indent=0]
4848
----
4949

50-
This time we used the linked list’s `removeLast` method. That’s all we need for a stack implementation. Check out the full implementation https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/stacks/stack.js[here].
50+
This time we used the linked list’s `removeLast` method. That’s all we need for a stack implementation. Check out the full implementation https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/stacks/stack.js[here].
5151

5252
== Implementation Usage
5353

‎book/chapters/tree--binary-search-tree.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Take a look at the code above and the example. You will see how to remove node `
148148
include::{codedir}/data-structures/trees/binary-search-tree.js[tag=leftMost, indent=0]
149149
----
150150

151-
That’s all we need to remove elements from a BST. Check out the complete BST implementation https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/binary-search-tree.js[here].
151+
That’s all we need to remove elements from a BST. Check out the complete BST implementation https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/trees/binary-search-tree.js[here].
152152

153153
== Differentiating a balanced and non-balanced Tree
154154

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /