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
Consider a multiprocessor system and a multithreaded program written using the many-to-many threading model. Let the number of u
Montano1993 [528]

Answer:

At the point when the quantity of bit strings is not exactly the quantity of processors, at that point a portion of the processors would stay inert since the scheduler maps just part strings to processors and not client level strings to processors. At the point when the quantity of part strings is actually equivalent to the quantity of processors, at that point it is conceivable that the entirety of the processors may be used all the while. Be that as it may, when a part string obstructs inside the portion (because of a page flaw or while summoning framework calls), the comparing processor would stay inert. When there are more portion strings than processors, a blocked piece string could be swapped out for another bit string that is prepared to execute, in this way expanding the use of the multiprocessor system.When the quantity of part strings is not exactly the quantity of processors, at that point a portion of the processors would stay inert since the scheduler maps just bit strings to processors and not client level strings to processors. At the point when the quantity of bit strings is actually equivalent to the quantity of processors, at that point it is conceivable that the entirety of the processors may be used at the same time. Be that as it may, when a part string hinders inside the piece (because of a page flaw or while summoning framework calls), the relating processor would stay inert. When there are more portion strings than processors, a blocked piece string could be swapped out for another bit string that is prepared to execute, along these lines expanding the usage of the multiprocessor framework.

4 0
3 years ago
Gas chromatography separates compounds depending on their__________ . Benzene, m-xylene, and toluene have similar_________ , the
amm1812

Answer and Explanation:

Gas chromatography separates compounds depending on their **polarity and volatility**. Benzene, m-xylene, and toluene have similar **polarities**, therefore, the main basis for separation is **volatility**. The more volatile a component the ** higher its vapor pressure**, hence the more time it spends in the **gaseous mobile phase**, giving it a **shorter** retention time. Therefore, components of a liquid mixture will elute in order of **increasing boiling points/decreasing volatilities/increasing polarities with the stationary phase**.

3 0
3 years ago
Using the Rayleigh criterion, calculate the minimum feature size that can be resolved in a system with a 0.18 NA lens when g-lin
Vladimir79 [104]

Answer:

a)

# for a g line, R = 1.211 μm

# for an I-line, R = 1.013 μm

b)

# for a g line, R = 0.726 μm

# for an I-line, R = 0.243 μm

c)

# for a g line, R = 0.605 μm

# for an I-line, R = 0.608 μm

Explanation:

We know that;

Rayleigh Resolution R = 0.5 × λ/NA

for a g line, λ = 436 nm

for an I-line λ = 365 nm

a)

Now when NA = 0.18

# for a g line, λ = 436 nm

R = 0.5 × 436/0.18 =  1.211 μm

# for an I-line λ = 365 nm

R = 0.5 × 365/0.18 =  1.013 μm

b)

when NA = 0.30

# for a g line, λ = 436 nm

R = 0.5 × 436/0.30 =  0.726 μm

# for an I-line λ = 365 nm

R = 0.5 × 365/0.30 =  0.243 μm

c)

when NA = 0.36

# for a g line, λ = 436 nm

R = 0.5 × 436/0.36 =  0.605 μm

# for an I-line λ = 365 nm

R = 0.5 × 365/0.30 =  0.608 μm

6 0
3 years ago
n the Spring of 2015, three utility companies in the Ukraine received email purporting to come from Ukraine's parliament, the Ra
Tresset [83]

Answer:

Trojan horse

Explanation:

A trojan horse attack is a type of malware that misleads users, as it appears unsuspicious at first, but actually presents a threat to the user. A common example is that of an email that contains a malicious attachment. Another common example is that of a fake advertisement. The name comes from the Greek story of the Trojan horse that led to the fall of the city of Troy.

5 0
3 years ago
You don't have to notify employees that a lockout/tagout is about to begin?
Sergeu [11.5K]

Answer:

When the imposter is sus : O

Explanation:

3 0
3 years ago
Other questions:
  • What is an Algorithm? *
    5·1 answer
  • A 5 m deep deposit of sand and silt containing organic layers is to be compacted using explosives placed in the boreholes locate
    13·1 answer
  • A circuit contains four 100 ohm resistors connected in series. If you test the circuit with a DMM you should read a total resist
    14·1 answer
  • If you have a hole diameter of 0.250 with a tolerance of ±0.005, what are the limits of the hole size?
    13·1 answer
  • Which cod is the best whoever has the best awnser gets brainliest​
    12·1 answer
  • The difference between an initial condition and a boundary condition for conduction in a solid is:___________
    9·1 answer
  • What should you use to keep battery terminals from corroding
    12·1 answer
  • can anyone help me with this please.i have the current and pf for branch 1 and 2 but cant figure out the total current, pf and a
    12·1 answer
  • Describe the greatest power in design according to Aravena?
    15·1 answer
  • How to clean a snowblower carburetor without removing it.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!