LeetCode
LeetCode copied to clipboard
Fix typo: s.mgth() -> s.size() in 3234.Count-the-Number-of-Substrings-With-Dominant-Ones
Fix typo: s.mgth() -> s.size() in 3234.Count-the-Number-of-Substrings-With-Dominant-Ones
Also, we don't need max() on line 24:
ret += extra+1;
because the if statement:
if (right[j-1] + have >= count*count)
already ensures the variable extra is non-negative.