1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mamont248 [21]
3 years ago
5

Chegg Suppose the heap is a full tree, size 2^n-1. what is the minimum number of steps to change a min heap to a max heap. Show

your logic.
Computers and Technology
1 answer:
adoni [48]3 years ago
4 0

Answer:

Explanation:

We start from the bottom-most and rightmost internal node of min Heap and then heapify all internal modes in the bottom-up way to build the Max heap.

To build a heap, the following algorithm is implemented for any input array.

BUILD-HEAP(A)

   heapsize := size(A)

   for i := floor(heapsize/2) downto 1

       do HEAPIFY(A, i)

   end for

Convert the given array of elements into an almost complete binary tree.

Ensure that the tree is a max heap.

Check that every non-leaf node contains a greater or equal value element than its child nodes.

If there exists any node that does not satisfy the ordering property of max heap, swap the elements.

Start checking from a non-leaf node with the highest index (bottom to top and right to left).

You might be interested in
It is the "executable" phrase of Word<br>Wide Web with dynamic applications,?<br>​
Mkey [24]

Answer:

It is the “executable” phrase of Word Wide Web with dynamic applications, interactive services, and “machine-to-machine” interaction. In Web 3.0, computers can interpret information like humans and intelligently generate and distribute useful content tailored to the needs of users.

4 0
3 years ago
An administrator has just added a new update to the WSUS server and she wants to test the update to the test group. Which of the
DENIUS [597]

Answer:

a. gpupdate /force

Explanation:

Based on the information provided within the question it can be said that if the administrator does not want to wait she can use the command gpupdate /force. This command allows the individual to update both the local Group Policy settings and Active Directory-based settings. This the force tag makes it so that the policy is immediately update.

6 0
4 years ago
Componets of computer
Temka [501]

The four components of computer are explained clearly.

<u>Explanation:</u>

  • Hardware is the electrical physical parts that a computer system needs to function. It organizes all the process  by a circuit board that operates within a PC or laptop; built with the "motherboard", "graphics card", "CPU (Central Processing Unit)", "ventilation fans", "webcam", "power supply", and so on. Without hardware, there is no means of running the necessary software that makes computers so valuable.
  • Software is a program that facilitates a computer to execute a particular task, as objected to the hardware. Computer software has to be "stored" into the computer's storage (such as a hard drive, memory, or RAM). Working computer systems segment software into three major classes: system software, programming software, and application software.
  • A user is a person who handles a computer or network service. Users of computer and software output regularly require the technical expertise needed to fully know how they operate.
  • Data is defined as bases or figures, or knowledge that's saved in or utilized by a computer. This data will be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be prepared by the CPU and are saved in files and folders on the hard disk.
3 0
4 years ago
Difference between rainbow six siege starter edition and regular
Svetradugi [14.3K]
Regular means all operators charms etc cost normal price, but the Starter edition increases the price for all of those things but it is cheaper then the reg version
8 0
4 years ago
What tasks do data entry macros commonly perform? Check all that apply.
Paha777 [63]

Answer:

test whether a user entered a value

3 0
3 years ago
Other questions:
  • Hotspots are an example of ______________ wireless networks.
    7·1 answer
  • For C++ (please make sure it runs properly)
    14·1 answer
  • Which activity constitutes legal computer activity?
    12·1 answer
  • Manipulate the SQL statement to pull ALL fields and rows from Customers table that have a PostalCode of 44000. TIP: Since Postal
    13·1 answer
  • EASY POINTS
    5·1 answer
  • The blank is the area on your screen where you can access the tab and menu options for word
    5·1 answer
  • Which two tasks are responsibilities of a network administrator?
    8·1 answer
  • *When a computer programmer is finished writing or developing a program, what has to happen first before the computer can unders
    8·1 answer
  • I WILL GIVS BRAINLIEST IF U ANSWER THIS
    9·1 answer
  • What are the 4 types of satellite?​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!