Given a circular linked list, implement a method to delete its head node. Return the list's new head node.
1->2->3->4->*1 ==> 2->3->4->*2
head
's previous node to head
's next node.
1. Traverse to the node
which points to head
.
2. Point it's next node
to head's next
reference.
public ListNode deleteAtHead(ListNode head) { }
C
Java
Python