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 63fd518

Browse files
Merge pull request #62 from amejiarosario/hotfix/hashmap
fix(book/maps): update space complexity
2 parents aac8160 + 0be0176 commit 63fd518

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

‎book/content/part03/map.asc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ include::treemap.asc[]
5252
As we discussed so far, there is a trade-off between the implementations.
5353
(((Tables, Non-Linear DS, HashMap/TreeMap complexities)))
5454

55+
// also on: book/content/part03/time-complexity-graph-data-structures.asc
5556
// tag::table[]
5657
.Time complexity for different Maps implementations
5758
|===

‎book/content/part03/set.asc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ rehash happens, it will take *O(n)* instead of *O(1)*. A `TreeSet` is always *O(
215215

216216
(((Tables, Non-Linear DS, HashSet/TreeSet complexities)))
217217

218+
// also on: book/content/part03/time-complexity-graph-data-structures.asc
218219
// tag::table[]
219220
.Time complexity HashSet vs TreeSet
220221
|===

‎book/content/part03/time-complexity-graph-data-structures.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ In this section, we learned about Graphs applications, properties and how we can
1818
| Hash Map (naïve) ^|O(n) ^|O(n) ^|O(n) ^|O(n) ^|O(n)
1919
| <<part03-graph-data-structures#hashmap, HashMap>> (optimized) ^|O(1) ^|O(n) ^|O(1)* ^|O(1) ^|O(n)
2020
| <<part03-graph-data-structures#treemap, TreeMap>> (Red-Black Tree) ^|O(log n) ^|O(n) ^|O(log n) ^|O(log n) ^|O(n)
21-
| <<part03-graph-data-structures#hashset, HashSet>> ^|- ^|O(n) ^|O(1)* ^|O(1)* ^|O(1)*
22-
| <<part03-graph-data-structures#tree-set, TreeSet>> ^|- ^|O(n) ^|O(log n) ^|O(log n) ^|O(log n)
21+
| <<part03-graph-data-structures#hashset, HashSet>> ^|O(1) ^|- ^|O(1)* ^|O(1) ^|O(n)
22+
| <<part03-graph-data-structures#tree-set, TreeSet>> ^|O(log n) ^|- ^|O(log n) ^|O(log n) ^|O(n)
2323
|===
2424
{empty}* = Amortized run time. E.g. rehashing might affect run time to *O(n)*.
2525
// end::table[]

0 commit comments

Comments
(0)

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