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
Travka [436]
3 years ago
7

Consider an array of size nine with the numbers in the following order: 40, 60, 20, 80, 70, 90, 30, 10, 50. (a) Create the heap

using the algorithm described in class. Show the heap as a tree. Show the heap as an array. Exactly how many comparisons did heap creation use

Computers and Technology
1 answer:
Murljashka [212]3 years ago
4 0

Answer:

See attached picture for heap creation steps.

10 comparisons were used.

Explanation:

See attached pictures.

You might be interested in
Can you install Ubuntu on a hard drive by porting from the folder to the HDD?
Len [333]

No you can not. It will not allow you to

8 0
3 years ago
Write a program whose input is two integers and whose output is the two integers swapped.
Tpy6a [65]

Answer:

The program to this question can be given as:

Program:

#include <iostream>  //header file

using namespace std;   //using namespace.

void SwapValues(int* userVal1, int* userVal2); //function declaration.

void SwapValues(int* userVal1, int* userVal2) //function definition.

{ //function body.

//perform swapping

   int t = *userVal1;  

   *userVal1 = *userVal2;

   *userVal2 = t;

}

int main() //main method  

{

int n1, n2; //define variable

cout<<"Enter first number :"; //message

cin>>n1; //input by user.

cout<<"Enter second number :"; //message  

cin>>n2; //input by user.

SwapValues(&n1,&n2); //calling function.

cout<<"Swapped values"<<endl;

cout<<"first number is :"<<n1<<endl; //print value

cout<<"second number is:"<<n2<<endl; //print value

return 0;

}

Output:

Enter first number :3

Enter second number :8

Swapped values

first number is :8

second number is :3

Explanation:

The description of the above C++ language program can be given as:

  • In the program, firstly we include the header file. Then we declare and define a function that is "SwapValues()" function in the function we pass two integer variable that is "userVal1 and userVal2" inside a function, we define an integer variable that is "t" and perform swapping.  
  • Then we define the main function in the main function we define two variables that is "n1 and n2" this variable is used to take value-form user. then we pass this value to function and print the function values.

5 0
3 years ago
The macro command is available on the ___ tab<br> Home<br> Insert<br> View<br> Design
nataly862011 [7]

      Answer                     : Insert tab                                              

5 0
3 years ago
Read 2 more answers
How are clustering and Network Load Balancing similar?
Elza [17]

Answer:

Load balancing is the mechanism happening between the different components to achieve the aim independently in the server. They are not aware of the presence of the other resources with them.

Clustering is the process in which the components work to gain the desired results in the form of group.They work in group so that there are no chances of crash  in server.

The similarity arises between these two process are :

  • They have capability to work even after failure of system
  • Can have unnecessary access to the information
  • Scalable

5 0
3 years ago
Select the correct answer.
Gnom [1K]

Answer:

CSS, HTML & JavaScript.

Explanation:

The first Murray will need to learn will be HTML for the site and then CSS for the design of the site.

Then he needs JavaScript to allow him make his showcase his pictures.

4 0
3 years ago
Other questions:
  • When an object is instantiated, it receives its own copy of all static variables of the class?
    14·1 answer
  • The analysis of how people relate to each other is known as?
    6·1 answer
  • Slmething about device for defrosting windscreen?
    5·1 answer
  • Which of the following is the best definition of metatheatre?
    8·1 answer
  • A 6.7 kg object moves with a velocity of 8 m/s. What's its kinetic energy?
    6·2 answers
  • You need to install an RODC in a new branch office and want to use an existing workgroup server running Windows Server 2012 R2.
    10·1 answer
  • How do you implement instruction level parallelism
    11·1 answer
  • Brake fluid is made up of a chemical that:
    13·2 answers
  • What is the best way of farming exotics in destiny?
    12·2 answers
  • What are some similarity's between NES console and consoles today
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!