importjava.util.LinkedList;importjava.util.Queue;publicclassGFG116{publicstaticintmin_operations(int n,int[]arr,int[]brr){// code hereQueue<Integer>q=newLinkedList<>();for(int i:arr){q.add(i);}int i=0;int ans=0;while(i<n){int y=q.remove();if(y==brr[i]){i++;}else{q.add...
importjava.util.LinkedList;importjava.util.Queue;publicclassGFG116{publicstaticintmin_operations(int n,int[]arr,int[]brr){// code hereQueue<Integer>q=newLinkedList<>();for(int i:arr){q.add(i);}int i=0;int ans=0;while(i<n){int y=q.remove();if(y==brr[i]){i++;}else{q.add...