Complete the code to add an element to the end of the queue.
queue := []int{1, 2, 3}
queue = append(queue, [1])
fmt.Println(queue)Appending 4 adds it to the end of the queue, following FIFO order.
Complete the code to remove the first element from the queue.
queue := []int{1, 2, 3, 4}
queue = queue[[1]:]
fmt.Println(queue)Removing the first element means slicing from index 1 onward.
Fix the error in the code to correctly enqueue an element.
queue := []int{5, 6}
queue = append([1], 7)
fmt.Println(queue)append needs the slice variable as first argument to add elements.
Fill both blanks to dequeue the first element and print it.
queue := []int{10, 20, 30}
first := queue[[1]]
queue = queue[[2]:]
fmt.Println(first, queue)The first element is at index 0, and slicing from 1 removes it from the queue.
Fill all three blanks to enqueue 40, dequeue first element, and print both.
queue := []int{100, 200, 300}
queue = append(queue, [1])
first := queue[[2]]
queue = queue[[3]:]
fmt.Println(first, queue)Append 40 to enqueue, get first element at index 0, then slice from 1 to dequeue.
