79233083

Date: 2024-11-28 08:33:54
Score: 1
Natty:
Report link

From Visualization of Heap Operations:

A heap is a specialized tree-based data structure that follows specific rules for organizing data. It comes in two main types:

And back to your question

  1. Yes. A sorted array is a min heap.
  2. When you use a max-heap, you should focus on the maximum value, which is the top of the tree.

By the way, you can visually understand the concept of heaps at the previous site.

Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • No code block (0.5):
Posted by: selfboot