Question
Here is my unfinish c# code. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication { class DoubleLinkedList { public void AppendToTail(int
Here is my unfinish c# code.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace ConsoleApplication { class DoubleLinkedList { public void AppendToTail(int x) {
} public int RemoveFromHead() {
} } class FIFOQueue { private DoubleLinkedList Dll; public FIFOQueue() { Dll = new DoubleLinkedList(); } public void Enqueue(int x) { Dll.AppendToTail(x); } public int Dequeue() { return Dll.RemoveFromHead(); }
} class Program { static void Main(string[] args) { FIFOQueue Q = new FIFOQueue(); } } }
Implement FIFO queue of integers using a double linked list as its underlying physical data structure. Note that double linked list implementation can be found in the following. The program must contain the following 2 operations: enqueue and dequeue. Your Main method should test your FIFO queue class. (Note, do not include double linked list methods that will not be used by your FIFO queue class class)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started