Pregunta:
Program how an item is removed from a circular queue
Autor: Will ParkerRespuesta:
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 calificaciones)
1 answer(s) in total