diff --git a/book/content/part03/set.asc b/book/content/part03/set.asc index 04b95a01..cbe6fe60 100644 --- a/book/content/part03/set.asc +++ b/book/content/part03/set.asc @@ -220,8 +220,8 @@ rehash happens, it will take *O(n)* instead of *O(1)*. A `TreeSet` is always *O( |=== .2+.^s| Data Structure 2+^s| Searching By .2+^.^s| Insert .2+^.^s| Delete .2+^.^s| Space Complexity ^|_Index/Key_ ^|_Value_ -| HashSet ^|- ^|O(n) ^|O(1)* ^|O(1)* ^|O(1)* -| TreeSet ^|- ^|O(n) ^|O(log n) ^|O(log n) ^|O(log n) +| HashSet ^|O(1) ^|- ^|O(1)* ^|O(1) ^|O(n) +| TreeSet ^|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[]