#3234
Count the Number of Substrings With Dominant Ones
expert · 1005 · lc medium +32 · 42.1% accepted · 632 likes · top 23%
Description
You are given binary string s. Return the count of substrings with dominant ones, meaning the count of 1s is at least the square of the count of 0s.
Code
1
2
3