Binary Prefix Divisible By 5 - Leetcode 1018 - Python
NeetCodeIO · 14:26
NeetCode solves LeetCode's "Binary Prefix Divisible By 5" by building each prefix number with a left shift plus the next bit. The key point is to store only cur % 5 rather than the full number. Shifting left doubles t...