Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ca0308

Browse files
Steve SunSteve Sun
Steve Sun
authored and
Steve Sun
committed
make Eclipse happy
1 parent3257c2b commit9ca0308

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

‎MEDIUM/src/medium/LinkedListRandomNode.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
*/
2929
publicclassLinkedListRandomNode {
3030

31-
}
32-
33-
classSolution {
31+
privateclassSolution {
3432
privateMap<Integer,ListNode>map;
3533
privateRandomrand;
3634

@@ -50,4 +48,5 @@ public int getRandom() {
5048
returnmap.get(rand.nextInt(map.size())).val;
5149
}
5250
}
51+
}
5352

‎MEDIUM/src/medium/RandomPickIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Solution_MemoryLimitExceeded {
3838
privateMap<Integer,List<Integer>>map =newHashMap();
3939
java.util.Randomrand =newjava.util.Random();
4040

41-
publicSolution_MLE(int[]nums) {
41+
publicSolution_MemoryLimitExceeded(int[]nums) {
4242
for(inti =0;i <nums.length;i++){
4343
if(map.containsKey(nums[i])){
4444
List<Integer>list =map.get(nums[i]);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp