Game of Strings
CodeChefOpen on judge ↗
You are given two non-empty strings S and T of equal length. S contains '0', '1', '?' and T contains '0' and '1'. You have to convert S into T in minimum number of moves. There are 3 types of move you can apply to the string each costing 1 points. 1) You can change a '?' in S to '0' or '1' 2) You can swap any two characters in S 3) You can change a '0' in S to '1' Input The first line of t
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start