✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following pseudo code. Assume that IntQueue is an integer . What does the function fun do?
void fun(int n)
{
IntQueue q = new IntQueue();
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);
ptint(a);
}
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!