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
I found a place that will give me 20% discount if I spend over $50. My pill is $75. How much money will I save?
olasank [31]
75*.2=15
you would save $15

hope that helps
5 0
3 years ago
What is the slope of this ​
Sveta_85 [38]

Answer:

Step-by-step explanation:

x = (0.5,0)

y= (0,-3)

slope = 2

5 0
3 years ago
Which equation can you use to solve for figure shown?
DIA [1.3K]

Hey mate

Here is ur answer ...

I hope it'll help ....

4 0
3 years ago
Read 2 more answers
What is the distributive property of 2(3+6y)
serious [3.7K]

Answer:

6+12y

Step-by-step explanation:

first, distribute the 2 to the parenthesis:

-multiply the 2 to the 3 and 6y

We get 6+12y

hope this helps :)

7 0
3 years ago
Write an equation in slope-intercept form for a line that passes through the point (1, 6) and
Mars2501 [29]

Answer:

y=2x+4

Step-by-step explanation:

If the line has a slope of two, that means it goes up 2 on the y axis for every 1 on the x axis. So, if it goes through (1,6), then you can subtract 1 from the x axis and two from the y axis to find the y intercept, (0,4).

5 0
3 years ago
Other questions:
  • Write each expression as the product of two factors   1x3+7x3=
    5·2 answers
  • The equation of the line that contains the points (1, 7) and (2, 6) is x+y=8
    5·1 answer
  • For her presentation on the Wonders of the World, Mary baked a square pyramid-shaped cake as pictured below. The slant height of
    13·1 answer
  • 0.08 is 10 times grater than
    5·1 answer
  • 2(x-3)=1/2(4x-12)<br>please help MEH!!!!!....​
    12·1 answer
  • Margaret wants to cover a footrest in the shape of a rectangular prism with cotton fabric. The footrest is 18 in. 12 in. 10 in.
    12·2 answers
  • If a original image is 2 inches and a scale drawing is 3.5 inches what is the scale factor?
    15·1 answer
  • Assume that adults have IQ scores that are normally distributed with a mean of μ= 105 and a standard deviation Ï =20 . Find the
    14·1 answer
  • A bakery sells a box of 14 cookies for $13.50 and charges $0.65 for each additional cookie. If Pamela has $30.00 to buy the box
    14·1 answer
  • Find the distance and displacement for the following figures :
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!