A->B->C->D->E->A is our circular linked list and front points to A.

Now if we want to add F, copy F to A and now insert A between F and B.

our linked list will become-

A->B->C->D->E->F->A

THIS METHOD IS CORRECT BUT INVOLVES ONE COPY OPERATION. CAN WE ANSWER O(1) IN GATE ?

Now if we want to add F, copy F to A and now insert A between F and B.

our linked list will become-

A->B->C->D->E->F->A

THIS METHOD IS CORRECT BUT INVOLVES ONE COPY OPERATION. CAN WE ANSWER O(1) IN GATE ?