Complete the code to create a new node with given data.
node := &Node{data: [1], next: nil}The new node must hold the actual data value, here 5.
Complete the code to link the new node to itself to form a circular list.
node.next = [1]In a circular singly linked list with one node, the node points to itself.
Fix the error in the code to correctly insert a new node after head in the circular list.
newNode.next = head.next
head.next = [1]To insert newNode after head, head.next must point to newNode.
Fill both blanks to complete the function that creates a circular singly linked list with one node.
func createCircularList(data int) *Node {
node := &Node{data: data, next: [1]
[2] = node
return node
}The node's next points to itself, and head is assigned to node.
Fill all three blanks to complete the function that inserts a new node after head in the circular singly linked list.
func insertAfterHead(head *Node, data int) {
newNode := &Node{data: [1], next: [2]
head.next = [3]
}newNode holds data, points to head.next, and head.next is updated to newNode.
