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

Commit 2a515c2

Browse files
refactor 189
1 parent b87ebf6 commit 2a515c2

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

‎src/main/java/com/fishercoder/solutions/_189.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static class Solution2 {
4949
* My original idea and got AC'ed.
5050
* One thing to notice is that when k > nums.length, we'll continue to rotate_naive the array, it just becomes k -= nums.length
5151
*/
52-
public static void rotate_naive(int[] nums, int k) {
52+
public static void rotate(int[] nums, int k) {
5353
if (k == 0 || k == nums.length) {
5454
return;
5555
}
@@ -77,7 +77,7 @@ public static void rotate_naive(int[] nums, int k) {
7777
}
7878
}
7979
}
80-
80+
8181
public static class Solution3 {
8282
public void rotate(int[] nums, int k) {
8383
int tmp = 0;
@@ -90,5 +90,5 @@ public void rotate(int[] nums, int k) {
9090
}
9191
}
9292
}
93-
93+
9494
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /