diff --git a/book/content/part03/map.asc b/book/content/part03/map.asc index b32802fb..11106d4f 100644 --- a/book/content/part03/map.asc +++ b/book/content/part03/map.asc @@ -52,6 +52,7 @@ include::treemap.asc[] As we discussed so far, there is a trade-off between the implementations. (((Tables, Non-Linear DS, HashMap/TreeMap complexities))) +// also on: book/content/part03/time-complexity-graph-data-structures.asc // tag::table[] .Time complexity for different Maps implementations |=== diff --git a/book/content/part03/set.asc b/book/content/part03/set.asc index cbe6fe60..4f02fa61 100644 --- a/book/content/part03/set.asc +++ b/book/content/part03/set.asc @@ -215,6 +215,7 @@ rehash happens, it will take *O(n)* instead of *O(1)*. A `TreeSet` is always *O( (((Tables, Non-Linear DS, HashSet/TreeSet complexities))) +// also on: book/content/part03/time-complexity-graph-data-structures.asc // tag::table[] .Time complexity HashSet vs TreeSet |=== diff --git a/book/content/part03/time-complexity-graph-data-structures.asc b/book/content/part03/time-complexity-graph-data-structures.asc index 620171ed..a62d68c4 100644 --- a/book/content/part03/time-complexity-graph-data-structures.asc +++ b/book/content/part03/time-complexity-graph-data-structures.asc @@ -18,8 +18,8 @@ In this section, we learned about Graphs applications, properties and how we can | Hash Map (naïve) ^|O(n) ^|O(n) ^|O(n) ^|O(n) ^|O(n) | <> (optimized) ^|O(1) ^|O(n) ^|O(1)* ^|O(1) ^|O(n) | <> (Red-Black Tree) ^|O(log n) ^|O(n) ^|O(log n) ^|O(log n) ^|O(n) -| <> ^|- ^|O(n) ^|O(1)* ^|O(1)* ^|O(1)* -| <> ^|- ^|O(n) ^|O(log n) ^|O(log n) ^|O(log n) +| <> ^|O(1) ^|- ^|O(1)* ^|O(1) ^|O(n) +| <> ^|O(log n) ^|- ^|O(log n) ^|O(log n) ^|O(n) |=== {empty}* = Amortized run time. E.g. rehashing might affect run time to *O(n)*. // end::table[]