We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b87ebf6 commit 2a515c2Copy full SHA for 2a515c2
src/main/java/com/fishercoder/solutions/_189.java
@@ -49,7 +49,7 @@ public static class Solution2 {
49
* My original idea and got AC'ed.
50
* One thing to notice is that when k > nums.length, we'll continue to rotate_naive the array, it just becomes k -= nums.length
51
*/
52
- public static void rotate_naive(int[] nums, int k) {
+ public static void rotate(int[] nums, int k) {
53
if (k == 0 || k == nums.length) {
54
return;
55
}
@@ -77,7 +77,7 @@ public static void rotate_naive(int[] nums, int k) {
77
78
79
80
-
+
81
public static class Solution3 {
82
public void rotate(int[] nums, int k) {
83
int tmp = 0;
@@ -90,5 +90,5 @@ public void rotate(int[] nums, int k) {
90
91
92
93
94
0 commit comments