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
inna [77]
4 years ago
5

You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive by o

ne, sequentially (as their heights appear in A). For the i-th student, if there is a row in which all the students are taller than A[i], the student will stand in one of such rows. If there is no such row, the student will create a new row. Your task is to find the minimum number of rows created. test cases
Mathematics
1 answer:
Marrrta [24]4 years ago
6 0

The minimum number of rows is 1: if A is sorted in descending order, every next students will arrive in a row where everyone is taller than him, and no new rows will be created.

For example, consider

A = [190, 175, 170, 165, 150]

The first students creates the first row.

The second student is 175cm tall. In the first row everyone is taller than him (there's only the 190cm student), so he'll stand in this row.

The third student, 170cm, will find the row filled by the students who are 190 and 175cm tall. So, everyone is taller than him and he'll stand in that row as well.

You keep going with the other students, and you'll see that no one will form a new row.

You might be interested in
How much water is in the cylinder ?
Mariulka [41]

Answer:

  339π in³

Step-by-step explanation:

The amount of water is the difference between the volume of the cylinder and the volume of the ball. The appropriate volume formulas are ...

  cylinder V = πr²h

  sphere V = (4/3)πr³

For the given numbers, the volumes are ...

  cylinder V = π(5 in)²(15 in) = 375π in³

  sphere V = (4/3)π(3 in)³ = 36π in³

The water volume is the difference of these ...

  water volume = cylinder V - sphere V

     = 375π in³ - 36π in³ = 339π in³

5 0
4 years ago
Which of the following situations are equal to 20%? Select all that apply.
lilavasa [31]

Answer:

all except C.

Step-by-step explanation:

8 0
3 years ago
Read 2 more answers
-4t > -20 step by step please
kenny6666 [7]
-4t > -20
To solve for t, you have to divide -4 on both sides:
-4t/-4 > -20/-4
t > 5 its your answer.
Hope this helps!!!

6 0
4 years ago
Any help will do! Thank you!
leonid [27]

<u>Let's take this problem step-by-step:</u>

 

<u>First let's set up the equation for the cost for one week of renting the car</u>

  • agency charges $230 per week

              charge = 230

  • agency charges $0.25 per mile (<em>lets set the number of miles as 'x')</em>

<em>               </em>charge = 230 + 0.25x

<u>The total cost was 415</u>, <em>therefore:</em>

             415 =230 + 0.25x\\185 = 0.25x\\x = 740

Therefore, you traveled 740 miles

<u>Answer: 740 miles</u>

<u></u>

Hope that helps!

#LearnwithBrainly

3 0
2 years ago
ben had a part time job at the fun station . suppose he worked 13.5 hours one week and made $81 . how much did ben earn per hour
erica [24]

81 = 13.5x

x is the amount he earns per hour.

To get the answer, use inverse operations and divide both sides by 13.5.

13.5x divided by 13.5 is x.

81 divided by 13.5 is 6.

6=x

This means that he earned $6 per hour

7 0
4 years ago
Other questions:
  • What is the GCF of 32ab 3 and 40a 2?
    12·1 answer
  • for the first 18 days of the month, buffet dinner generate $11,800 in sales. The buffet sale target for the month is $18,650. Gi
    10·1 answer
  • Show work when multiplying 3.9×5.3
    15·2 answers
  • What is the equation of the line that passes through the point (3, -3) and has a slope of 0?
    8·1 answer
  • the expression f(x)=x³+ax²+bx+c leaves the same remainder,R, when it is divided by x+2 and when it is divided by x-2. evalute b.
    13·1 answer
  • 70%of $10 =$<br> Complete the following the statement
    8·2 answers
  • Find the domain of this relation <br> (3, 6)<br> (–6, 6)<br> (2, –13)
    15·1 answer
  • The perimeter of a rectangle is 20 cm. The length of the rectangle is 3 cm less than 2 1/4 times the width. Find the dimensions
    5·1 answer
  • Find the area of the sector.<br> 20 degrees<br> 6 cm radius
    7·1 answer
  • Square root 11 +3 square root 11
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!