Dsa
Strings
Hard
String Transformation Cost
Given two strings s1 and s2, return the minimum number of character changes required to transform s1 into s2. A character change means replacing a character with another one. For example,
Input: s1 = 'abc', s2 = 'yab'
Output: 2
Key concepts
stringsdynamic-programming
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now