Skip to content

Commit 70dbf7b

Browse files
refactor 706
1 parent a956404 commit 70dbf7b

File tree

1 file changed

+0
-27
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-27
lines changed

src/main/java/com/fishercoder/solutions/_706.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**706. Design HashMap
4-
*
5-
* Design a HashMap without using any built-in hash table libraries.
6-
*
7-
* To be specific, your design should include these functions:
8-
*
9-
* put(key, value) : Insert a (key, value) pair into the HashMap. If the value already exists in the HashMap, update the value.
10-
* get(key): Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key.
11-
* remove(key) : Remove the mapping for the value key if this map contains the mapping for the key.
12-
*
13-
* Example:
14-
*
15-
* MyHashMap hashMap = new MyHashMap();
16-
* hashMap.put(1, 1);
17-
* hashMap.put(2, 2);
18-
* hashMap.get(1); // returns 1
19-
* hashMap.get(3); // returns -1 (not found)
20-
* hashMap.put(2, 1); // update the existing value
21-
* hashMap.get(2); // returns 1
22-
* hashMap.remove(2); // remove the mapping for 2
23-
* hashMap.get(2); // returns -1 (not found)
24-
*
25-
* Note:
26-
*
27-
* All keys and values will be in the range of [0, 1000000].
28-
* The number of operations will be in the range of [1, 10000].
29-
* Please do not use the built-in HashMap library.*/
303
public class _706 {
314
public static class Solution1 {
325
/**

0 commit comments

Comments
 (0)