public static void Main(string[] args) { QueueLL q = new QueueLL(); q.add(1); q.add(2); q.add(3); for (int i = 0; i < 3; i++) { Console.WriteLine(q.remove()); } }
public void QCreateQueueLL() { QueueLL <int> queue = new QueueLL <int>(); queue.Enqueue(1); queue.Enqueue(5); queue.Enqueue(13); int ExpPop = 1; Assert.AreEqual(ExpPop, queue.Dequeue()); ExpPop = 5; Assert.AreEqual(ExpPop, queue.Dequeue()); }