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
ANEK [815]
4 years ago
5

Suggest a data structure that supports the following operations on the grades that a student at the university receives. Assume

that the total number n of exams that the student might take is large. The data structure should support the following operations: (each in O(log n) time, where n is the number of exams taken). (a) insert(exam date, exam-grade). This operation informs the data structure that the student received at date exam date the grade exam-grade. (b) average (datei, datez). As a response to this operation the data structure should answer what is the average of all grades that are received between the dates date and date2. Assume again that all dates are different, and for simplicity, assume that no exam took place in date, nor in date2. Hint: Start by solving the simpler task of being able to report the number of exams that took place between date, to date,
Engineering
1 answer:
Likurg_2 [28]4 years ago
3 0

Answer:

I would suggest a balanced binary search tree or an AVL tree.

AVL tree is a self balancing binary tree. It maintains its BST properties with an additional property that difference between height of left sub-tree and right sub-tree of any node can’t be more than 1.

a). The time complexity for insertion in an AVL tree is O(log n)

b). For searching also, time complexity is O(log n) because the the tree is balanced.

Explanation:

You might be interested in
Which option distinguishes the step in the engineering design phase described in the following scenario?
rewona [7]

Answer:

reasearching the problem

Explanation:

EDG

7 0
3 years ago
What should I do I if a patient I’s bleeding th our his penis
Brilliant_brown [7]

Answer:

YOU SHOULD HELP HIM

Explanation:

6 0
3 years ago
Read 2 more answers
14. The load across a 50.0-V battery consists of a
Paladinen [302]
The answer you’re looking for is
A.
- I hope this helps, I got it right. Enjoy the rest of your day/night, please make me brainliest!
7 0
3 years ago
Is a gas turbine a heat engine?
Nookie1986 [14]
Gas turbines extract the energy from combustion gas

and heat engines convert thermal and chemical energy to mechanical energy

gas is considered a chemical so i'm pretty sure it is considered one
4 0
3 years ago
A manometer consists of an inclined glass tube which communicates with a metal cylinder standing upright; liquid fills the appar
Vanyuwa [196]

Answer:

48.61

Explanation:

See attached diagram.

The level rise in the tube is l sin α.

The level drop in the cylinder (let's call it y) is:

π/4 D² y = π/4 d² l

D² y = d² l

y = l (d/D)²

The elevation difference is the sum:

l sin α + l (d/D)²

l (sin α + (d/D)²)

From Bernoulli's principle:

P = ρgl (sin α + (d/D)²)

Divide both sides by density of water (ρw) and gravity:

P/(ρw g) = (ρ/ρw) l (sin α + (d/D)²)

h = S l (sin α + (d/D)²)

If we disregard the level change in the cylinder:

h = S l (sin α)

We want the percent error between these two expressions for h to be 0.1% when α = 25°.

[ S l (sin α + (d/D)²) − S l (sin α) ] / [ S l (sin α + (d/D)²) ] = 0.001

[ S l sin α + S l (d/D)² − S l sin α ] / [ S l (sin α + (d/D)²) ] = 0.001

[ S l (d/D)² ] / [ S l (sin α + (d/D)²)]  = 0.001

(d/D)² / (sin α + (d/D)²) = 0.001

(d/D)² = 0.001 (sin α + (d/D)²)

(d/D)² = 0.001 sin α + 0.001 (d/D)²

0.999 (d/D)² = 0.001 sin α

d/D = √(0.001 sin α / 0.999)

When α = 25°:

d/D ≈ 0.02057

D/d ≈ 48.61

7 0
3 years ago
Other questions:
  • Martensitic transformations only occur in the Fe-C system. ___ Certain materials can age harden at room temperature. ___ Pure me
    7·1 answer
  • A photovoltaic panel of dimension 2m×4m is installed on the
    14·1 answer
  • Rivers account for _____% of the earth's fresh water.<br> ?
    10·2 answers
  • 3 If, for a particular junction, the acceptor concentration is 1017/cm3 and the donor concentration is 1016/cm3 , find the junct
    6·1 answer
  • What does CADCAM stand for ?
    10·2 answers
  • Question 1 An ice making machine operates on the ideal vapour-compression cycle using refrigerant R134a. The refrigerant enters
    14·1 answer
  • Liquid water at 300 kPa and 20°C is heated in a chamber by mixing it with superheated steam at 300 kPa and 300°C. Cold water ent
    7·1 answer
  • Compute the atomic density (the number of atoms per cm3 rather than mass density g/cm3) for a perfect crystal of silicon at room
    14·1 answer
  • In a CNC machining operation, the has to be moved from point (5, 4) to point(7, 2)along a circular path with center at (7,2). Be
    5·1 answer
  • What do we need to do to get CO2 emissions all the way to zero?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!