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
chubhunter [2.5K]
4 years ago
8

If necessary, open the Cleanup Animator and choose the Shuffle Left algorithm from the Select Algorithm drop-down list. Click Ru

n and observe the "loop inside a loop" nature of this algorithm by watching the animation. The general idea is that the L marker moves to the right trying to detect 0s. Each time it detects a 0, the R marker moves to the right, shuffling the data items to the left. Try this three or four times, remembering to click Reset to prepare for each run. Suppose the original data set consists of these numbers: What is the final arrangement of the data when the algorithm terminates?
Engineering
1 answer:
jek_recluse [69]4 years ago
3 0

Answer:

A = 42 32 0 0 0 77 23 71 is the list of numbers taken here as the question is incomplete.

L marker moves to the right trying to detect 0s. Each time it detects a 0, the R marker moves to the right, shuffling the data items to the left.

Get the array, A and its size, n

L = 1

R = 2

Repeat the following steps until left > legit

if AL ≠ 0

L ++

R ++

else

legit --

Repeat the following steps until right > n

Copy AR to AR

R ++

R = L + 1

stop

Explanation: The arrangement of data is as follows:

A = 42 32 0 0 0 77 23 71

N = 8; L= 1; R = 2

Iteration 1: 42 ≠ 0 => L = 2; R = 3

A = 42 32 0 0 0 77 23 71

Iteration 2: 32 ≠ 0 => L = 3; R = 4

A = 42 32 0 0 0 77 23 71

Iteration 3: 0 = 0 => N = 7

Copy the remaining elements one position to its left

A = 42 32 0 0 77 23 71

Iteration 4: 0 = 0 => N = 6

Copy the remaining elements one position to its left

A = 42 32 0 77 23 71

Iteration 5: 0 = 0 => N = 5

Copy the remaining elements one position to its left

A = 42 32 77 23 71

Iteration 6: 77 ≠ 0 => L = 4; R = 5

A = 42 32 77 23 71

Iteration 7: 23 ≠ 0 => L= 5; R = 6

A = 42 32 77 23 71

Iteration 8: 71 ≠ 0 => L= 6; R = 7

A = 42 32 77 23 71

L > N ---- stop

final arrangement of the data when the algorithm terminates

42 32 77 23 71

You might be interested in
A torque T 5 3 kN ? m is applied to the solid bronze cylinder shown. Determine (a) the maximum shearing stress, (b) the shethe 1
Lelechka [254]

£¢π£¥¥¥£€€√¢•€€÷×¶£¥€✓©¥%¶×^€[{%¶∆{£]=¥✓=€

4 0
3 years ago
A barometer reads a height of 78 cmHg. Express this atmospheric pressure to:
Yakvenalex [24]

  • A barometer reads a height of 78 cmHg. Express this atmospheric pressure to \large\mathsf{\red{\underline{Pascal(pa)}}}
7 0
3 years ago
Read 2 more answers
What is flow energy? Do fluids at rest possess any flow energy?
anzhelika [568]

Answer:

Flow energy is defined as, flow energy is the energy needed to push fluids into control volume and it is the amount of work done required to push the entire fluid. It is also known as flow work. Flow energy is not the fundamental quantities like potential and kinetic energy.

Fluid at state of rest do not possess any flow energy. It is mostly converted into internal energy as, rising in the fluid temperature.

8 0
3 years ago
A sample of sand weighs 490 g in stock and 475 in Oven Dry (OD) condition, respectively. If absorption capability of the sand is
Ivahew [28]

The weight of the specimen in SSD condition is 373.3 cc

<u>Explanation</u>:

a) Apparent specific gravity = \frac{A}{A-C}

Where,

A = mass of oven dried test sample in air = 1034 g

B = saturated surface test sample in air = 1048.9 g

C = apparent mass of saturated test sample in water = 975.6 g

apparent specific gravity = \frac{A}{A-C}

                                         = \frac{1034}{1034-675 \cdot 6}

Apparent specific gravity = 2.88

b) Bulk specific gravity G_{B}^{O D}=\frac{A}{B-C}

G_{B}^{O D}=\frac{1034}{1048.9-675 \cdot 6}

       =  2.76

c) Bulk specific gravity (SSD):

G_{B}^{S S D}=\frac{B}{B-C}

=\frac{1048 \cdot 9}{1048 \cdot 9-675 \cdot 6}

G_{B}^{S S D} = 2.80

d) Absorption% :

=\frac{B-A}{A} \times 100 \%

=\frac{1048 \cdot 9-1034}{1034} \times 100

Absorption = 1.44 %

e) Bulk Volume :

v_{b}=\frac{\text { weight of dispaced water }}{P \omega t}

=\frac{1048 \cdot 9-675 \cdot 6}{1}

= 373.3 cc

5 0
3 years ago
Economics is the study of how individuals and societies make choices under the condition of
k0ka [10]

Answer:

ig scarcity

Explanation:

Hope it Helps!!!

3 0
2 years ago
Other questions:
  • Show from the first principles that, for a perfect gas with constant specific heat capacities
    14·1 answer
  • Does the army good 4 you
    15·1 answer
  • A 5000-lb truck is being used to lift a 1000-lb boulder B that is on a 200-lb pallet A. Knowing that the truck starts from rest
    8·1 answer
  • A thick oak wall (rho = 545 kg/m3 , Cp = 2385 J/kgK, and k = 0.17 W/mK) initially at 25°C is suddenly exposed to combustion prod
    11·1 answer
  • How many kg moles of Sodium Sulphate will contain 10 kg of<br> Sodium?
    10·2 answers
  • Which of the following explains why trucking is the most widely used transportation method?
    14·1 answer
  • A series of end-milling cuts is currently used to produce an aluminum part that is an aircraft component. The purpose of the mac
    14·1 answer
  • Engineered lumber should not be used for
    15·1 answer
  • What two factors are changing when the current is changed on an electric generator
    7·1 answer
  • Help please i will give brainlist
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!