Video

Unknown · 0:00

The video solves LeetCode's "Count the Number of Substrings With Dominant Ones" in O(n·√n). A substring is valid when (count of zeros)² ≤ count of ones, and that rule means a valid substring can hold at most about √n...

Read the full summary on tuber

Redirecting...