Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 854 Bytes

README_401_30.md

File metadata and controls

38 lines (24 loc) · 854 Bytes

Hashtables

Challenge

Implement a Hashtable Class with the following methods:

  • add
    • Arguments: key, value
    • Returns: nothing
    • This method should hash the key, and add the key and value pair to the table, handling collisions as needed.
  • get
    • Arguments: key
    • Returns: Value associated with that key in the table
  • contains
    • Arguments: key
    • Returns: Boolean, indicating if the key exists in the table already.
  • hash
    • Arguments: key
    • Returns: Index in the collection for that key

Whiteboard Process

Hashtables

Approach & Efficiency

Big O Time <--- O(n) Space <----- O(1)

API