logo

Crowdly

Browser

Add to Chrome

IS52054A: ALGORITHMS 2 (2024-25)

Looking for IS52054A: ALGORITHMS 2 (2024-25) test answers and solutions? Browse our comprehensive collection of verified answers for IS52054A: ALGORITHMS 2 (2024-25) at learn.gold.ac.uk.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

In a singly linked-list, the instruction:

tmp->data=x
View this question

In a singly linked-list, the instruction:

 while(tmp!=NULL)

     tmp=tmp->next
View this question
If you implement a stack using a linked list, this pseudocode:

function g()

      if(top==NULL)

            return top->next
0%
0%
0%
0%
0%
View this question
If you implement a stack using a linked list, this pseudocode:

function g()

     if(top!=NULL)

            top=top->data
0%
0%
0%
0%
View this question
If you implement a queue using a linked list, this operation:

function h(x)

     newNode=new Node(x)

     tail->next=Newnode

     front->next=newNode
0%
0%
0%
0%
View this question
What is the return value from this block of pseudocode?

  s ← new Stack()

  q ← new Queue()

  push (-101,s)

   isempty(q)

  enqueue (40,q)

  enqueue (73,q)

  peek(s)

  dequeue (q)

  pop (s)

  enqueue (83,q)

  push (83,s)

   isempty(q)

   isempty(s)

  dequeue (q)

  return peek(q)

View this question
What is the return value from this block of pseudocode?

  q ← new Queue()

  enqueue (127,q)

  enqueue (105,q)

  peek(q)

  enqueue (78,q)

  enqueue (-35,q)

  dequeue (q)

  peek(q)

  return  isempty(q)

0%
0%
0%
0%
0%
View this question
What is the return value from this block of pseudocode?

  q ← new Queue()

  enqueue (50,q)

  enqueue (72,q)

  dequeue (q)

  dequeue (q)

  enqueue (40,q)

  dequeue (q)

  enqueue (-48,q)

  return peek (q)

View this question
What is the return value from this block of pseudocode?

  s ← new Stack()

  push (45,s)

  pop (s)

   isempty(s)

  push (65,s)

  pop (s)

  push (52,s)

  pop (s)

  return  isempty(s)

0%
0%
0%
0%
View this question
What is the return value from this block of pseudocode?

  s ← new Stack()

   isempty(s)

   isempty(s)

  push (45,s)

  push (-115,s)

  peek(s)

  push (103,s)

  push (55,s)

  return peek(s)

View this question

Want instant access to all verified answers on learn.gold.ac.uk?

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

Browser

Add to Chrome