This code is giving error on CB ide but works fine on other online IDEs like, codechef and paiza.io. When i was using the Queue class as written in code already, it was giving main class not found

Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

import java.util.*;

public class Main
{
static Scanner scn = new Scanner(System.in);

public static void main (String[] args) throws Exception
{
	// your code goes here
	Queue<Integer> q = new LinkedList<>();

	int n = scn.nextInt();
	int[] process = new int[n];
	for (int i = 0; i < n; i++) {
		q.add(scn.nextInt());
	}
	
	for(int i = 0;i < n;i++){
	
	    process[i] = scn.nextInt();
	}
	
	System.out.print(ImpofTime(q,process));
}

    public static int ImpofTime(Queue q,int[] orig_order) throws Exception{ 
// Write your Code here
int n = orig_order.length;
int time=0;

for(int i=0; i<n; i++)
{
	while(!q.peek().equals(orig_order[i]))
	{
		q.add(q.remove());
		time++;
	}

	if(q.peek().equals(orig_order[i])){
		q.remove();
		time++;
	}
}
//System.out.println(time);
return time;
}

}

here is your corrected function:

public static int ImpofTime(Queue q,int[] orig_order) throws Exception{ 
	
	// Write your Code here
		int n = orig_order.length;
		int time=0;

		for(int i=0; i<n; i++){
			while(q.getFront()!=(orig_order[i])){
				q.enqueue(q.getFront());
				q.dequeue();
				time++;
			}

			if(q.getFront()==(orig_order[i])){
				q.dequeue();
				time++;
			}
		}
		//System.out.println(time);
		return time;
	}