Question: please help with java solutions asaop '12) Spring Boot F.. Learn to speak a la... Full Stack Java Soft... New Tab Learn about how to...

please help with java solutions asaop
'12) Spring Boot F.. Learn to speak a la... Full Stack Java

'12) Spring Boot F.. Learn to speak a la... Full Stack Java Soft... New Tab Learn about how to... Given a source string S containing all the decimal digits exactly once in any order and a left 1 2 3 destination string D containing all the decimal digits exactly once in any other order, write a program to find the minimal number of moves required to transform string S to string D. A move consist of swapping any two "adjacent" digits. Ex: 124567 becomes 142567 on a single move which swaps the adjacent digits 2 and 4. Input format The input consists of 2 lines, each line containing a string of all decimal digits exactly once in some order, including O Constraints Length of the input strings is exactly ten corresponding to the 'decimal digits O 9 Output format The program or function must print out a single integer representing the number of minimal "swaps" required to generate the string in input line 2 from the string in input line 1. Sample input O 1234876590 1234890756 Sample output O 7 890F Search Mostly cloudy Shot on OnePlus Powered by Quad Camera

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!