Possible Or Not
CodeChefOpen on judge ↗
Chef has been given two strings A and B of same length and also provided that the strings only contain 'a' and 'b' as characters . Chef is curious and wants to check whether the string B can be converted into string A by swapping two characters of string B. If the string B is convertible then chef is interested in number of swaps required. Being chef's friend help him to overcome his curiosit
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