File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 28
28
*/
29
29
public class LinkedListRandomNode {
30
30
31
- }
32
-
33
- class Solution {
31
+ private class Solution {
34
32
private Map <Integer , ListNode > map ;
35
33
private Random rand ;
36
34
@@ -50,4 +48,5 @@ public int getRandom() {
50
48
return map .get (rand .nextInt (map .size ())).val ;
51
49
}
52
50
}
51
+ }
53
52
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class Solution_MemoryLimitExceeded {
38
38
private Map <Integer , List <Integer >> map = new HashMap ();
39
39
java .util .Random rand = new java .util .Random ();
40
40
41
- public Solution_MLE (int [] nums ) {
41
+ public Solution_MemoryLimitExceeded (int [] nums ) {
42
42
for (int i = 0 ; i < nums .length ; i ++){
43
43
if (map .containsKey (nums [i ])){
44
44
List <Integer > list = map .get (nums [i ]);
You can’t perform that action at this time.
0 commit comments