SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

Computer Science AQA A level

» Start this Course
(Practice similar questions for free)
Question:

Program how an item is removed from a circular queue

Author: Will Parker



Answer:

If (!Empty()) { string r = QueueArray[front]; QueueArray[front] = ""; front = (front + 1) % capacity; count--; return r; } else { throw new InvalidOperationException("Invalid operation. The queue is empty."); } Removing at item removes the first item. You don’t search for it


0 / 5  (0 ratings)

1 answer(s) in total