April 2018
Intermediate to advanced
300 pages
7h 41m
English
Dictionary, hashtable, and hashset objects store items in key—value format. However, hashsets and dictionaries are good for scenarios where performance is key. Here are a few circumstances where these types are useful:
The following table shows the Big O notation value for each operation that can be performed on these objects:
|
Operations |
Big O notation |
|
Access |
O(n) |
|
Search for the value if the key is not known |
O(n) |
|
Insert item |
O(n) |
|
Delete item |
O(n) |