Write the code fragment to insert a new node, referenced by newNode, into a nonempty queue represented by a circular linked list.
What will be an ideal response?
newNode.setNext(lastNode.getNext());
lastNode.setNext(newNode);
lastNode = newNode;
Computer Science & Information Technology