using System; using System.Collections.Generic; namespace /* TODO: your namespace goes here */ { public class MyQueue { private int[] queue = new int[100]; private int head = 0, tail = 0; public void Enqueue(int value) { // TODO: Implement this } public int Dequeue() { // TODO: Implement this } public int Count() { // TODO: Implement this } public bool IsEmpty() { // TODO: Implement this } public bool IsFull() { // TODO: Implement this } public void PrintData() { for (int i = head; i < tail; i++) { Console.Write(queue[i] + " "); } Console.WriteLine(); } } class Program { static void Main(string[] args) { MyQueue myQueue = new MyQueue(); myQueue.Enqueue(1); myQueue.PrintData(); myQueue.Enqueue(2); myQueue.PrintData(); myQueue.Enqueue(3); myQueue.PrintData(); Console.WriteLine("Dequeue: " + myQueue.Dequeue()); myQueue.PrintData(); Console.WriteLine("Dequeue: " + myQueue.Dequeue()); myQueue.PrintData(); myQueue.Enqueue(4); myQueue.PrintData(); Console.WriteLine("Queue Count: " + myQueue.Count()); Console.WriteLine("IsEmpty: " + myQueue.IsEmpty()) ; Console.WriteLine("IsFull: " + myQueue.IsFull()); /** * Expected Output * 1 * 1 2 * 1 2 3 * Dequeue: 1 * 2 3 * Dequeue: 2 * 3 * 3 4 */ } } }