• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

CMSC 341 Midterm 2 UPDATED ACTUAL Questions and CORRECT Answers

Document preview thumbnail
Preview 1 out of 3 pages

CMSC 341 Midterm 2 UPDATED ACTUAL Questions and CORRECT Answers

Content preview

CMSC 341 Midterm 2 UPDATED ACTUAL
Questions and CORRECT Answers
What operations are required to splay the node with key 80? (see quiz 4 #1) - CORRECT
ANSWER - zig-zag (right rotation - left rotation)


In a priority queue, the items leave the queue in the order that they arrived. - CORRECT
ANSWER - False


What is the array representation of nodes for the following heap data structure in an array
implementation? (see quiz 4 #3) - CORRECT ANSWER - DKQZSY


In a unsorted list implementation of priority queue, the worst case running time of removal
operations is ... - CORRECT ANSWER - O(n)


In a priority queue ADT, the smallest key always has the highest priority. - CORRECT
ANSWER - False



The height of a Heap data structure is ... - CORRECT ANSWER - O(log n)


In the C++ STL class "std::priority_queue" the insertion operation is called ... - CORRECT
ANSWER - push (...)



The following tree is not a complete tree. (see quiz 4 #8) - CORRECT ANSWER - True


Which one is the final shape of the min-heap after inserting the node B in the following min-
heap? (see quiz 4 #9) - CORRECT ANSWER - c



The storage space of a Heap data structure is O(log n). - CORRECT ANSWER - False, it
is O(n)

Document information

Uploaded on
October 26, 2025
Number of pages
3
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
STANFORDGRADESS
4.0
(241)
Sold
1674
Followers
109
Items
121810
Last sold
2 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions