✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Considere el siguiente pseudocódigo. Supongamos que IntQ es una cola de enteros. ¿Qué hace la siguiente función?
void runQueue(int n){ IntQ q = new IntQ(); q.enqueue(0); q.enqueue(1); for (int i = 0; i < n; i++) { int a = q.dequeue(); int b = q.dequeue(); q.enqueue(b); q.enqueue(a + b); system.out.println(a); }}