Priority Queues: Quiz >> Data Structures
*Please Do Not Click On The Options.
* If You Click Mistakenly Then Please Refresh The Page To Get The Right Answers.
Priority Queues: Quiz
TOTAL POINTS 6
1.
How many edges of this binary tree violate the min-heap property? In other words, for how many edges of the tree, the parent value is greater than the value of the child?
1 point
2.
This binary tree contains 13 nodes, and hence we have 13 subtrees here (rooted at each of 13 nodes). How many of the subtrees are complete?
1 point
3. Consider a complete binary tree represented by an array [19,14,28,15,16,7,27,15,21,21,5,2][19,14,28,15,16,7,27,15,21,21,5,2].
How many edges of this tree violate the max-heap property? In other words, for how many edges of the tree, the parent value is smaller than the value of the child?
1 point
4. Assume that a max-heap with 10^5105 elements is stored in a complete 5-ary tree. Approximately how many comparisons a call to {\tt Insert()}Insert() will make?
1 point
5. Assume that a max-heap with 10^6106 elements is stored in a complete 7-ary tree. Approximately how many comparisons a call to {\tt ExtractMax()}ExtractMax() will make?
1 point
6. Assume that we represent a complete dd-ary tree in an array A[1\dots n]A[1…n] (this is a 1-based array of size nn). What is the right formula for the indices of children of a node number ii?
1 point
Related Questions & Answers:
- Dynamic Arrays and Amortized Analysis Dynamic Arrays and Amortized Analysis >> Data Structures *Please Do Not Click On The Options. * If You Click Mistakenly ... Read more...
- Quiz: Disjoint Sets Quiz: Disjoint Sets >> Data Structures *Please Do Not Click On The Options. * If You Click Mistakenly Then Please ... Read more...
- Hash Tables and Hash Functions Hash Tables and Hash Functions >> Data Structures *Please Do Not Click On The Options. * If You Click Mistakenly ... Read more...
- They want to create employee identification numbers (IDs) in column D. The IDs should include the year hired plus the last four digits of the employee’s Social Security Number (SS#). What function will create the ID 20201939 for the employee in row 4? 5. A data analyst in a human resources department is working with the following selection of a spreadsheet: A ... Read more...
- For a function to work properly, data analysts must follow each function’s predetermined structure. What is this structure called? 3. For a function to work properly, data analysts must follow each function’s predetermined structure. What is this structure called? ... Read more...
- A data analyst is analyzing medical data for a health insurance company. The dataset contains billions of rows of data. Which of the following tools will handle the data most efficiently? 1. A data analyst is analyzing medical data for a health insurance company. The dataset contains billions of rows of ... Read more...