Leetcode 1375. Number of Times Binary String Is Prefix-Aligned
Given a permutation flips describing the order in which bits in an all-zero length-n binary string are turned to 1, count how many steps i produce a prefix-aligned string (positions 1..i all ones and the rest zeros). Equivalently, count the moments when the maximum index flipped so far equals the current step i.
Asked at:
Salesforce
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Mid February, 2026
Salesforce
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.