Question: please write down comments for each step. Given two strings A and B, the task is to convert A to B if possible. The only



please write down comments for each step.
Given two strings A and B, the task is to convert A to B if possible. The only operation allowed is to put any character from A and insert it at front. Find if it's possible to convert the string. If yes then output minimum no. of operations required for transformation. Input: A- "ABD, B-"BAD Output: 1 Explanation: Pick B and insert it at front Input: A-EAC8D, B "EABCD" Output: 3 Explanation: Pick B and insert at front, EACBD -> BEACD Pick A and insert at front, BEACDABECD Pick E and insert at front, ABECD >EABCD
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
