GoLang Solution For LeetCode Problem: Design HashMap
Solving Design HashMap in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Problem Description
To be specific, your design should include these functions:
get(key)
: Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key.
Example:
MyHashMap hashMap = new MyHashMap();
Note:
- Please do not use the built-in HashMap library.
See the full details of the problem Design HashMap at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.