When we want a priority queue, and the following is true: after enqueuing a group of elements, they can be sorted in O( n ) time, and after dequeuing starts, we will never enqueue again; then we should use:

A. a heap for the priority queue
B. a heapify function
C. an array for the priority queue
D. a stack for the priority queue


C

Computer Science & Information Technology

You might also like to view...

COGNITIVE ASSESSMENT Which term is used to describe the practice that users' access privileges are limited to the lowest level necessary to perform required tasks?

A. theory of restriction B. principle of least privilege C. hierarchy of administration D. protocol of access

Computer Science & Information Technology

____ reserves the number of bytes requested by the argument passed to the function.

A. malloc() B. calloc() C. realloc() D. balloc()

Computer Science & Information Technology

How many relational database engines does RDS currently support?

A. Three: MySQL, Oracle and Microsoft SQL Server. B. Just two: MySQL and Oracle. C. Six: Amazon Aurora, Oracle, Microsoft SQL Server, PostgreSQL, MySQL and MariaDB. D. Just one: MySQL.

Computer Science & Information Technology

Which set of Amazon S3 features helps to prevent and recover from accidental data loss?

A. Object lifecycle and service access logging B. Object versioning and Multi-factor authentication C. Access controls and server-side encryption D. Website hosting and Amazon S3 policies

Computer Science & Information Technology