var MyHashMap = function () {
this.map = new Map();
};
* @param {number} key
* @param {number} value
* @return {void}
*/
MyHashMap.prototype.put = function (key, value) {
this.map.set(key, value);
};
* @param {number} key
* @return {number}
*/
MyHashMap.prototype.get = function (key) {
const val = this.map.get(key);
return val !== undefined ? val : -1;
};
* @param {number} key
* @return {void}
*/
MyHashMap.prototype.remove = function (key) {
this.map.delete(key);
};
* Your MyHashMap object will be instantiated and called as such:
* var obj = new MyHashMap()
* obj.put(key,value)
* var param_2 = obj.get(key)
* obj.remove(key)
*/