Professional Documents
Culture Documents
*;
class Node {
public int data;
public Node next;
}
class LinkedList {
public Node head;
if(temp == null){ //if there is no any node than n node becomes head node
head = n;
}
else{
while(temp.next != null){ //loop is for travering upto the last node
temp = temp.next;
}
temp.next = n;
}
}
public class q1 {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int t = sc.nextInt();
while(t-- != 0){
LinkedList l =new LinkedList();
l.head = l.remixOperation(l.head,time,no/time);
l.printList();
}
}
}