Question: Please help me answer this coding question. You can write the code in either Python3 or Java8 ; whichever one is easier and faster but
Please help me answer this coding question. You can write the code in either Python3 or Java8 ; whichever one is easier and faster but please comment the code. Please also provide screenshots of your output after entering the inputs; it should match the sample inputs and outputs in the question. Thank You!


It is so difficult to keep everything in order! For this problem, you have two lists of numbers, each list having length n. Each number in one list has a corresponding number in the other list. The correspondence is that if both lists were in sorted and placed side by side, each pair of numbers would correspond. For example, in the list:s (48, 10,97) and (7, 46, 20), the corresponding numbers are 10 with 7,48 with 20, and 97 with 46. You want to keep the lists synchronized, but you know that the second list has gotten out of order. So you want to put it in the same order as the first list, according to the correspondences For example, given the two lists above, the second list should be reordered as (20, 7,46) to be in order with the first list. Input Input consists at most 100 test cases. Each test case begins with an integer 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
