Heap Sort and Binary Heaps

11 flashcardsby Maria
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
The first step in Heap Sort is to put the items in what structure?
binary tree
2
What type of binary tree is used to start Heap Sort?
  • Complete Binary Tree
  • Partial Binary Tree
  • Left Balance Binary Tree
3
What is built as the initial structure in Heap Sort?
  • Heap
  • Root
  • Complete
4
Which item is repeatedly removed during Heap Sort?
  • Root
  • Heap
  • Complete
5
What process is performed after each removal in Heap Sort?
Reheap or Rebuild
6
When a binary tree is complete, using an array instead of linked nodes is a better choice.
  • TRUE
  • FALSE
7
In an array-based heap starting at index 1, when removing the heap’s largest object, you remove the root node.
  • TRUE
  • FALSE
8
In a maxheap, the object in each node is greater than or equal to the objects in the node’s ancestors.
  • FALSE
  • TRUE
9
In the array-based heap, the add method uses O(n) operations.
  • FALSE
  • TRUE
10
We can use a heap to sort an array.
  • TRUE
  • FALSE
11
Define a complete tree.
A complete tree is full to its next-to-last level, and its leaves on the last level are filled in from left to right.
Study all 11 cards for free

More Computer science flashcards

Section 1.1-1.3: Windows Commands/OS58 cardsComputer science · Englishpzxlimemory 48 cardsComputer science · EnglisherikaCS 325 T7 L4,5,641 cardsComputer science · EnglishClementSecurity Plus Ports35 cardsComputer science · EnglishJohnComputer Networks Part 230 cardsComputer science · EnglishSgPt. 123 cardsComputer science · EnglishCornyNa+- és vízháztartás zavarai18 cardsComputer science · HungarianRitikeAlgorithms itself13 cardsComputer science · EnglishSabs2023Microsoft Azure Administrator (AZ-104)150 cardsComputer science · EnglishIsmaealITEC 110: Information Technology and Cybersecurity147 cardsComputer science · EnglishmackNetwork Security and Cryptography Quiz97 cardsComputer science · EnglishDiandreiHDL and Assembly Language Midterm Exam74 cardsComputer science · EnglishDiandrei

All Computer science decks

Study these decks in the app

Free on iPhone, Android, Mac and the web. Add any deck to your account in one tap.

Download on the App StoreGet it on Google Play
Study all 11 cards for free