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 0344298

Browse files
Merge pull request #61 from amejiarosario/hotfix/hashmap
fix(book/hashset): update hashset space complexity
2 parents 81c5f0d + 0319b29 commit 0344298

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎book/content/part03/set.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ rehash happens, it will take *O(n)* instead of *O(1)*. A `TreeSet` is always *O(
220220
|===
221221
.2+.^s| Data Structure 2+^s| Searching By .2+^.^s| Insert .2+^.^s| Delete .2+^.^s| Space Complexity
222222
^|_Index/Key_ ^|_Value_
223-
| HashSet ^|- ^|O(n) ^|O(1)* ^|O(1)* ^|O(1)*
224-
| TreeSet ^|- ^|O(n) ^|O(log n) ^|O(log n) ^|O(log n)
223+
| HashSet ^|O(1) ^|- ^|O(1)* ^|O(1) ^|O(n)
224+
| TreeSet ^|O(log n) ^|- ^|O(log n) ^|O(log n) ^|O(n)
225225
|===
226226
{empty}* = Amortized run time. E.g. rehashing might affect run time to *O(n)*.
227227
// end::table[]

0 commit comments

Comments
(0)

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