We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4a5aa7 commit 1b775bdCopy full SHA for 1b775bd
C++/stone-game-v.cpp
@@ -21,7 +21,7 @@ class Solution {
21
for (int i = 0; i <= n - l; ++i) {
22
const int j = i + l - 1;
23
while (prefix[mid[i]] - prefix[i] < prefix[j + 1] - prefix[mid[i]]) {
24
- ++mid[i];
+ ++mid[i]; // Time: O(n^2) in total
25
}
26
const int p = mid[i];
27
max_score = 0;
0 commit comments