Count the Number of Substrings With Dominant Ones - Leetcode 3234 - Python

NeetCodeIO · 30:34 · Watch on YouTube

이 비디오는 LeetCode의 "Count the Number of Substrings With Dominant Ones"을 O(n·√n)으로 풉니다. 부분 문자열이 유효한 조건은 (0의 개수)² ≤ 1의 개수이며, 이 규칙은 유효한 부분 문자열이 최대 약 √n개의 0만 포함할 수 있음을 의미합니다. 솔루션은 모든 왼쪽 인덱스를 시도하고, 오른쪽 포인터를 0에서 0으로 점프하며, 0 사...

Read the full summary on retube

English