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
A 78-percent efficient 12-hp pump is pumping water from a lake to a nearby pool at a rate of 1.5 ft3/s through a constant-diamet
fenix001 [56]

Answer:

irreversible head loss is 38.51 ft

mechanical power 6.55 hp

Explanation:

Given data:

Pump Power 12 hp = 8948.39 watt = 6600 lbs ft/sec

Q = 1.5 ft^3/s

Pump actually delivers P'  = \eta P = 0.78 \times 8948.39 = 6979.74 watt

Power that water gains= mgh = \rho \phi gh = r \phi h

P = 62.4 \times 1.5 \times 32 = 2995.2 lbs ft/sec

hence Power lost = 6600 - 2995.2  3604.8 lbs ft/sec = 6.55 hp

head losshl = \frac{3604.8}{r \phi} = \frac{3604.8}{62.4 \times 1.5}

hl = 38.51 ft

8 0
3 years ago
Air at 38°C and 97% relative humidity is to be cooled to 14°C and fed into a plant area at a rate of 510m3/min. (a) Calculate th
Katarina [22]

To develop the problem it is necessary to apply the concepts related to the ideal gas law, mass flow rate and total enthalpy.

The gas ideal law is given as,

PV=mRT

Where,

P = Pressure

V = Volume

m = mass

R = Gas Constant

T = Temperature

Our data are given by

T_1 = 38\°C

T_2 = 14\°C

\eta = 97\%

\dot{v} = 510m^3/kg

Note that the pressure to 38°C is 0.06626 bar

PART A) Using the ideal gas equation to calculate the mass flow,

PV = mRT

\dot{m} = \frac{PV}{RT}

\dot{m} = \frac{0.6626*10^{5}*510}{287*311}

\dot{m} = 37.85kg/min

Therfore the mass flow rate at which water condenses, then

\eta = \frac{\dot{m_v}}{\dot{m}}

Re-arrange to find \dot{m_v}

\dot{m_v} = \eta*\dot{m}

\dot{m_v} = 0.97*37.85

\dot{m_v} = 36.72 kg/min

PART B) Enthalpy is given by definition as,

H= H_a +H_v

Where,

H_a= Enthalpy of dry air

H_v= Enthalpy of water vapor

Replacing with our values we have that

H=m*0.0291(38-25)+2500m_v

H = 37.85*0.0291(38-25)-2500*36.72

H = 91814.318kJ/min

In the conversion system 1 ton is equal to 210kJ / min

H = 91814.318kJ/min(\frac{1ton}{210kJ/min})

H = 437.2tons

The cooling requeriment in tons of cooling is 437.2.

3 0
3 years ago
A short-circuit experiment is conducted on the high-voltage side of a 500 kVA, 2500 V/250 V, single-phase transformer in its nom
Anarel [89]

Given Information:

Primary secondary voltage ratio = 2500/250 V

Short circuit voltage = Vsc = 100 V

Short circuit current = Isc = 110 A

Short circuit power = Psc = 3200 W

Required Information:

Series impedance = Zeq = ?

Answer:

Series impedance = 0.00264 + j0.00869 Ω

Step-by-step explanation:

Short Circuit Test:

A short circuit is performed on a transformer to find out the series parameters (Z = Req and jXeq) which in turn are used to find out the copper losses of the transformer.

The series impedance in polar form is given by

Zeq = Vsc/Isc < θ

Where θ is given by

θ = cos⁻¹(Psc/Vsc*Isc)

θ = cos⁻¹(3200/100*110)

θ = 73.08°

Therefore, series impedance in polar form is

Zeq = 100/110 < 73.08°

Zeq = 0.909 < 73.08° Ω

or in rectangular form

Zeq = 0.264 + j0.869 Ω

Where Req is the real part of Zeq  and Xeq is the imaginary part of Zeq

Req = 0.264 Ω

Xeq = j0.869 Ω

To refer the impedance of transformer to its low voltage side first find the turn ratio of the transformer.

Turn ratio = a = Vp/Vs = 2500/250 =  10

Zeq2 = Zeq/a²

Zeq2 = (0.264 + j0.869)/10²

Zeq2 = (0.264 + j0.869)/100

Zeq2 = 0.00264 + j0.00869 Ω

Therefore, Zeq2 = 0.00264 + j0.00869 Ω is the series impedance of the transformer referred to its low voltage side.

4 0
3 years ago
A gas contained in a piston cylinder assembly undergoes a process from state 1 to state 2 defined by the following relationship
Minchanka [31]

Answer:

V2 = final volume = 8.3m^3

Explanation:

Given P1 = 445 kPa, V1 = 2.6 m^3, P2 = 140 kPa

From PV = constant; P1V1 =P2V2 , where V2 = final volume

V2 = P1V1/P2

Substituting in the equation ;

V2 = 445 x 2.6 / 140

V2 = final volume = 8.3m^3

6 0
3 years ago
Viết một đoạn văn nói về tình bạn
inn [45]

Answer:

Một người bạn luôn quan trọng trong cuộc sống của chúng ta, và mọi người đều thích sự bầu bạn của một người bạn. Tình bạn thật sự rất khó để có được. Trải qua mọi khó khăn, thất bại, người bạn thủy chung sẽ luôn sát cánh. Họ sẽ quan tâm đến bạn mọi lúc, và có được một tình bạn đích thực là một món quà thực sự Có được một người bạn đồng hành trong cuộc sống của bạn là rất quan trọng. Một người có thể hiểu được cảm xúc của bạn, ủng hộ bạn và sát cánh bên bạn trong những lúc tốt và xấu ngay cả khi mọi người quay lưng lại với bạn, một người như thế thật đáng quý biết bao. Đây là người mà chúng tôi gọi là bạn thân nhất của mình.

Explanation:

I hope that helps you

7 0
3 years ago
Other questions:
  • Consider the following fragment of code in an authentication program:
    9·1 answer
  • List irreversibilities
    11·1 answer
  • A 350 gal air storage tank is initially at 100 psig. For how long can the tank supply 30 cfm of air to a machine that requires a
    6·1 answer
  • Technician A says that as wheelbase becomes shorter in a highway truck, its resistance to yaw is
    14·1 answer
  • The gradual and uniform cooling of glass that has been heated in order to relieve random internal stresses is... Group of answer
    5·1 answer
  • How can we prevent chemical hazards in labotary
    9·1 answer
  • Develop an E-R model (E-R Diagram) for the application belowDatabase RequirementsLogin
    12·1 answer
  • 19 million Joules of chemical energy are supplied to a boiler in a power plant. 5 x 106 Joules of energy are lost through unburn
    15·1 answer
  • What is the difference between a cost and a benefit?
    12·1 answer
  • Ahmed records the number of questions he has answered on DFM per day over 14 days, and puts the data in the table below.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!