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
WARRIOR [948]
3 years ago
8

2 point) what is the height of a d-heap that contains n elements? the height should be a function of n and

Mathematics
1 answer:
belka [17]3 years ago
6 0
Assuming a d-heap means the order of the tree representing the heap is d.
Most of the computer applications use binary trees, so they are 2-heaps.

A heap is a complete tree where each level is filled (complete) except the last one (leaves) which may or may not be filled.

The height of the heap is the number of levels.  Hence the height of a binary tree is Ceiling(log_2(n)), for example, for 48 elements, log_2(48)=5.58.
Ceiling(5.58)=6.  Thus a binary tree of 6 levels contains from 2^5+1=33 to 2^6=64 elements, and 48 is one of the possibilities.  So the height of a binary-heap with 48 elements is 6.

Similarly, for a d-heap, the height is ceiling(log_d(n)).



You might be interested in
Players on a softball team are randomly given a uniform with a two-digit number on the back. The numbers range from 10 to 99. Wh
Minchanka [31]

Answer:

1/10 or 10%

Step-by-step explanation:

99 possible numbers starting from 10

1,2,3,4,5,6,7,8,9 does not count

99-9=90

90 numbers total

possible numbers with a 0: 9

9/90 = 1/10 = 10%

7 0
3 years ago
I’m currently working on my quadrilaterals unit (specifically with trapezoids & kites) and I need major help on a lot of the
allochka39001 [22]

Answer: 29.2

Step-by-step explanation:

The lengths of the two longer legs are both \sqrt{8^2 + 4^2}=\sqrt{80}

The lengths of the two shorter legs are both \sqrt{4^2+4^{2}}=\sqrt{32}

So P=2\sqrt{80}+2\sqrt{32} \approx 29.2

5 0
2 years ago
Read 2 more answers
Kiran and his cousin work during the summer for a landscaping company. Kiran's cousin has been working for the company longer, s
Marta_Voda [28]
Kiran earns $8.50 per hour.

Let x represent Kiran's pay.  He worked 23 hours last week, so his pay would be given by 23x.

Kiran's cousin is paid 30% more.  30% = 30/100 = 0.3.  We add this to the x per hour that Kiran is paid:

x + 0.3x = 1.3x

This is multiplied by 27, since Kiran's cousin works 27 hours:
27(1.3x)

This gives us the following equation:
23x + 27(1.3x) = 493.85
23x + 35.1x = 493.85
58.1x = 493.85

Divide both sides by 58.1:
58.1x/58.1 = 493.85/58.1
x = 8.5

Thus Kiran earns 8.50 per hour.
8 0
3 years ago
The square of a number, n, is equal to the sum of that number and 5. Which equation represents this relationship?
irina1246 [14]
N^2  = n + 5

That would be B
3 0
4 years ago
The increasing popularity of soccer in America is an example of how
Fynjy0 [20]
B. Immigrants have affected America’s culture
Bc them Spanish played football more, Americans grew to love it too.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Can someone pls help??
    14·1 answer
  • Evaluate the exponential function A(t) = 150(1.05)7 to the nearest hundredth.
    6·2 answers
  • 2. Find the Unit price per can if it cots $3 for 6 cans of sodas. Round To the nearest hundredths. $0.5 per can $0.6 per can
    7·1 answer
  • How do I subract fractions?
    11·1 answer
  • I know the answers but I don't know how to solve it
    7·1 answer
  • A cerise box has a height of 32 centimeters. It has a base with an area of 160 square centimeters. What is the volume, in cubic
    15·1 answer
  • 9. On Johnny math test, he was asked to re-write the expression –3(x + 10) by using the distributive
    8·1 answer
  • 16. What is the value of 2 1/8x4 3/4
    14·1 answer
  • POSSIBLE POINTS 100
    7·2 answers
  • Giving Brainiest help me pleasee tyyy <3
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!