logo

Crowdly

Consider the following pseudo code. Assume that IntQueue is an integer queue ....

✅ 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

queue

. 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);

    }

}

More questions like this

Want instant access to all verified answers on curs.upb.ro?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!