Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1529. Minimum Suffix Flips
Given a binary target string and an all-zero source, you may flip any suffix [i..n-1]; find the minimum number of such suffix-flip operations to obtain target. This is a greedy/observation problem: the optimal number equals the count of bit transitions in target when including the initial change from '0'.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.