Skip to content

Commit ea37bb2

Browse files
edit 396
1 parent c9d004f commit ea37bb2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Your ideas/fixes/algorithms are more than welcome!
203203
|399|[Evaluate Division](https://leetcode.com/problems/evaluate-division/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_399.java)| O(n*n!)|O(n) | Medium| Graph, DFS, Backtracking
204204
|398|[Random Pick Index](https://leetcode.com/problems/random-pick-index/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_398.java) | | | Medium| Reservoir Sampling
205205
|397|[Integer Replacement](https://leetcode.com/problems/integer-replacement/)|[Solution](../master/src/main/java/com/fishercoder/solutions/IntegerReplacement.java)| ? | ? | Easy| BFS
206-
|396|[Rotate Function](https://leetcode.com/problems/rotate-function/)|[Solution](../master/src/main/java/com/fishercoder/solutions/RotateFunction.java)| O(n^2) could be optimized to O(n) | O(1) | Easy|
206+
|396|[Rotate Function](https://leetcode.com/problems/rotate-function/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_396.java)| O(n^2) could be optimized to O(n) | O(1) | Easy|
207207
|393|[UTF-8 Validation](https://leetcode.com/problems/utf-8-validation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_393.java)| O(?)|O(?) | Medium| Bit Manipulation
208208
|392|[Is Subsequence](https://leetcode.com/problems/is-subsequence/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_392.java)| O(m*n)|O(1) | Medium| Array, String
209209
|390|[Elimination Game](https://leetcode.com/problems/elimination-game/)|[Solution](../master/src/main/java/com/fishercoder/solutions/EliminationGame.java)| O(logn)|O(1) | Medium|

src/main/java/com/fishercoder/solutions/RotateFunction.java renamed to src/main/java/com/fishercoder/solutions/_396.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Calculate the maximum value of F(0), F(1), ..., F(n-1).
2222
2323
So the maximum value of F(0), F(1), F(2), F(3) is F(3) = 26.*/
2424
//F(k) = 0 * Bk[0] + 1 * Bk[1] + ... + (n-1) * Bk[n-1]
25-
public class RotateFunction {
25+
public class _396 {
2626
public int maxRotateFunction(int[] A) {
2727
if(A == null || A.length == 0) return 0;
2828
int[] F = new int[A.length];
@@ -55,7 +55,7 @@ private int[] rotate(int[] a) {
5555

5656
public static void main(String...strings){
5757
int[] nums = new int[]{4, 3, 2, 6};
58-
RotateFunction test = new RotateFunction();
58+
_396 test = new _396();
5959
System.out.println(test.maxRotateFunction(nums));
6060
}
6161
}

0 commit comments

Comments
 (0)