Machine-translated by Google. Questions are authored in English.
Top

Discussion

A queue data structure can be used for :

  • A.Resource allocation
  • B.Expression parsing
  • C.Recursion
  • D.Expression evaluation

Answer: A

A queue can be used for Resource allocation.

A queue is first-in, first-out, so it suits sharing a resource fairly among waiting requests: CPU scheduling, printer spooling and disk request queues all serve jobs in the order they arrive.

Expression parsing, expression evaluation and recursion all depend on last-in, first-out behaviour, so they use a stack, not a queue.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.