Interview Algorithms: Difference between revisions
No edit summary |
|||
| Line 110: | Line 110: | ||
==Data Structures== | ==Data Structures== | ||
===Hashmap=== | ===Hashmap=== | ||
Also known as a dictionary or associative array. | Also known as a dictionary or associative array. These are used everywhere.<br> | ||
If you know your inputs are bounded non-negative values, then you can use an array like <code>std::vector</code>.<br> | |||
Otherwise, just use a hashmap to build a lookup table. | |||
===Segment Trees=== | ===Segment Trees=== | ||