Skip to content

Commit 3cebd50

Browse files
edit 370
1 parent e91b963 commit 3cebd50

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Your ideas/fixes/algorithms are more than welcome!
218218
|373|[Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/)|[Solution](../master/src/main/java/com/fishercoder/solutions/FindKPairsWithSmallestSums.java)| O(?)|O(?) | Medium| Heap
219219
|372|[Super Pow](https://leetcode.com/problems/super-pow/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_372.java)| O(n)|O(1) | Medium| Math
220220
|371|[Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_371.java)| O(n)|O(1) | Easy|
221-
|370|[Range Addition](https://leetcode.com/problems/range-addition/)|[Solution](../master/src/main/java/com/fishercoder/solutions/RangeAddition.java)| O(n+k)|O(1) | Medium|
221+
|370|[Range Addition](https://leetcode.com/problems/range-addition/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_370.java)| O(n+k)|O(1) | Medium|
222222
|369|[Plus One Linked List](https://leetcode.com/problems/plus-one-linked-list/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_369.java)| O(n)|O(1) | Medium| Linked List
223223
|368|[Largest Divisible Subset](https://leetcode.com/problems/largest-divisible-subset/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_368.java)| O(n^2)|O(n) | Medium| DP
224224
|367|[Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_367.java)| O(n)|O(1) | Medium|

src/main/java/com/fishercoder/solutions/RangeAddition.java src/main/java/com/fishercoder/solutions/_370.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
For each update operation, do you really need to update all elements between i and j?
4040
Update only the first and end element is sufficient.
4141
The optimal time complexity is O(k + n) and uses O(1) extra space.*/
42-
public class RangeAddition {
42+
43+
public class _370 {
4344
/**Previously AC'ed brute force solution results in TLE now.*/
4445
public static int[] getModifiedArray_TLE(int length, int[][] updates) {
4546
int[] nums = new int[length];

0 commit comments

Comments
 (0)