Con you explain me this question

i don’t know no what to do in this question can you give me pseudo code of this question

I can explain you the question but you’d have to figure out the solution yourselves. So, imagine you have two arrays, of the same length, the second length is the correct order and the first array is the given order. Now, start processing the first array from its extreme left end, if this number equals the number at the left end of the second array, then remove both the numbers, i.e. first number from the first array and first number from the second array, move ahead. Now, if the two numbers do not match, remove the first element from the first array and put it at the end of the first array, this operation will cost you 1 unit. Now, do the same thing, check if the first element of the first array is same as the first element of the second array, if it is, remove both of them, else, remove the one from the first array, and put it in the back and so on. Everytime you remove elements from both of the arrays, the operation costs you 1 unit. Now, you need to calculate the total cost incurred till both the arrays get exhausted.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.