Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2896. Apply Operations to Make Two Strings Equal
Given two binary strings, minimize the cost to make s1 equal to s2 using operations that flip any two bits at cost x or two adjacent bits at cost 1. Because every operation flips two positions, the parity of mismatches must be even, and the core challenge is optimally pairing mismatched indices (via greedy/DP) to decide when to use adjacent fixes versus distant swaps.
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.