LeetCode icon indicating copy to clipboard operation
LeetCode copied to clipboard

Fix typo: s.mgth() -> s.size() in 3234.Count-the-Number-of-Substrings-With-Dominant-Ones

Open chl131 opened this issue 2 months ago • 1 comments

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.

chl131 avatar Nov 19 '25 03:11 chl131