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
KIM [24]
3 years ago
7

Why is thesize saved prior to entering the for loop? 2. what is the running time of removefirsthalf if lst is an arraylist? 3. w

hat is the running time of removefirsthalf if lst is a linkedlist?
Physics
1 answer:
Mrac [35]3 years ago
8 0
<span>After entering the loop, it should use the correct list size and the loop will be affected if the remove call changes the size of the list. If lst is an Arraylist the running time of removefirsthalf is O (n^2). So when the beginning is removed the next element will move forward. If lst is a LinkedList which is a dynamic structure the running is O (n) for removefirsthalf</span>
You might be interested in
A 500 g model rocket is on a cart that is rolling to the right at a speed of 3.0 m/s . The rocket engine, when it is fired, exer
ivanzaharov [21]

Answer:

The rocket has to be launched 8 m from the hoop

Explanation:

Let's analyze this problem, the rocket is on a car that moves horizontally, so the rocket also has the same speed as the car; The initial horizontal rocket speed is (v₀ₓ = 3.0 m/s).

On the other hand, when starting the engines we have a vertical force, which creates an acceleration in the vertical axis, let's use Newton's second law to find this vertical acceleration

    F -W = m a

    a = (F-mg) / m

    a = F/m  -g

    a = 7.0/0.500  - 9.8

    a = 4.2 m/s²

We see that we have a positive acceleration and that is what we are going to use in the parabolic motion equations

Let's look for the time it takes for the rocket to reach the height (y = 15m) of the hoop, when the rocket fires its initial vertical velocity is zero (I'm going = 0)

    y = v_{oy} t + ½ a t²

    y = 0 + ½ a t²

    t = √ 2y/a

    t = √( 2 15 / 4.2)

    t = 2.67 s

This time is also the one that takes in the horizontal movement, let's calculate how far it travels

    x = v₀ₓ t

    x = 3 2.67

    x = 8 m

The rocket has to be launched 8 m from the hoop

8 0
3 years ago
Two balls with equal masses, m, and equal speed, v, engage in a head on elastic collision. what is the final velocity of each ba
Allushta [10]
The collision is elastic. This means that both momentum and kinetic energy are conserved after the collision.

- Let's start with conservation of momentum. The initial momentum of the total system is the sum of the momenta of the two balls, but we should put a negative sign in front of the velocity of the second ball, because it travels in the opposite direction of ball 1. So ball 1 has mass m and speed v, while ball 2 has mass m and speed -v:
p_i = p_1-p_2 = mv-mv =0
So, the final momentum must be zero as well:
p_f = 0
Calling v1 and v2 the velocities of the two balls after the collision, the final momentum can be written as
p_f = mv_1 + mv_2 = 0
From which
v_1 = -v_2

- So now let's apply conservation of kinetic energy. The kinetic energy of each ball is \frac{1}{2} mv^2. Therefore, the total kinetic energy before the collision is
K_i = \frac{1}{2} mv^2 +  \frac{1}{2} mv^2 = mv^2
the kinetic energy after the collision must be conserved, and therefore must be equal to this value:
K_f = K_i = mv^2 (1)
But the final kinetic energy, Kf, is also
K_f =  \frac{1}{2} mv_1^2 +  \frac{1}{2}mv_2^2
Substituting v_1 = -v_2 as we found in the conservation of momentum, this becomes
K_f = mv_2 ^2
we also said that Kf must be equal to the initial kinetic energy (1), therefore we can write 
mv_2^2 = mv^2

Therefore, the two final speeds of the balls are
v_2 = v
v_1 = -v_2 = -v

This means that after the collision, the two balls have same velocity v, but they go in the opposite direction with respect to their original direction.

8 0
3 years ago
Who else watched the 2016 world series and became a cubs fan for life
balandron [24]

Answer:

Sheeeeeeeeeeeeesh

Explanation:

naw not really ФωФ

8 0
3 years ago
A uniform bar has two small balls glued to its ends. The bar has length L and mass M, while the balls each have mass m and can b
vazorg [7]

Answer:

Explanation:

Length of bar = L

mass of bar = M

mass of each ball = m

Moment of inertia of the bar about its centre perpendicular to its plane is

I_{1}=\frac{ML^{2}}{12}

Moment of inertia of the two small balls about the centre of the bar perpendicular to its plane is

I_{2}=2\times m\times \frac{L^{2}}{4}

I_{2}=\frac{mL^{2}}{2}

Total moment of inertia of the system about the centre of the bar perpendicular to its plane is

I = I1 + I2

I=\frac{ML^{2}}{12}+\frac{mL^{2}}{2}

I=\frac{(M +6m)L^{2}}{12}

8 0
3 years ago
You can chew through very tough objects with your incisors because they exert a large force on the small area of a pointed tooth
Gemiola [76]

Answer:

sry i need points

Explanation:

3 0
3 years ago
Other questions:
  • What is the equivalent resistance of the circuit?
    15·2 answers
  • Arrange the planets from strongest magnetic field to weakest magnetic field. Jupiter Earth Venus
    7·2 answers
  • Bricks and insulation are used to construct the walls of a house. The
    7·1 answer
  • What type of thermodynamic system is best to use to describe an operating automobile engine? A) Open O B) Dilated O C) Isolated
    8·1 answer
  • A car travels 70 miles in 80 minutes. Which is its average speed per minute
    11·2 answers
  • How frequently do most coastal areas experience high tides?
    10·1 answer
  • Work-Energy Theorem &amp; Power
    10·1 answer
  • Que substâncias deveria escolher para diminuir a basicidade ou para diminuir a acidez de uma solução? *
    9·1 answer
  • Reclamation would be classified as a _____ human activity for the environment. Positive or negative?
    10·1 answer
  • How close does the proton get to the line of charge?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!