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
Technician A says amperage cannot exist without both voltage and resistance. Technician B says if amperage is high, then you kno
Ivan

Answer:

Technician A

Explanation:

Ohms law:  I= E/R so rest resistance must be present along with E/potential difference.  Even if just wire shorted together there is resistance but very little.

Tech B: Again ohms law.  Current flow is directly proportional to the voltage and inversely  proportional to R (resistance or impedance).

8 0
3 years ago
The loneliest people are to kindest
valkas [14]

Answer:

The most damaged people are the wisest is a fact

Explanation:

5 0
3 years ago
Read 2 more answers
Who's your favorite singer and WHT your favorite song​
Anna007 [38]

Answer:

and my favorite song is popular loner

Explanation:

my favorite rapper is rod wave

6 0
3 years ago
Read 2 more answers
A liquid's viscosity increases with increasing temperature. a)-True b)-False
olasank [31]

Answer:

b) False

Explanation:

Viscosity:

   Viscosity is a fluid property and comes in the picture when fluid in the motion.In Simple words viscosity is the frictional force offered by fluid between the fluid layer.Viscosity provides a resistant to flow of fluid.

Generally viscosity are of two types

1.Dynamics viscosity

2.Kinematics viscosity

Generally in liquids when temperature of fluid is increases then molecular force between fluid particle goes to decreases.Due to this viscosity of liquids will decrease.

So our option b is right.

7 0
3 years ago
A heat exchanger takes compressed liquid water and converts it into steam with a temperature and pressure of 20 Mpa and 480 C; r
belka [17]

Answer:

See explaination

Explanation:

Lets first consider the term Isentropic efficiency. The isentropic efficiency of a compressor or pump is defined as the ratio of the work input to an isentropic process, to the work input to the actual process between the same inlet and exit pressures. IN practice, compressors are intentionally cooled to minimize the work input.

Please kindly check attachment for the step by step solution of the given problem.

6 0
3 years ago
Other questions:
  • Biologists use a sequence of letters A, C, T, and G to model a genome. A gene isa substring of a genome that starts after a trip
    5·1 answer
  • Where Does a Solar Engineer Work? <br> (2 sentences or more please)
    14·2 answers
  • Which of the following does NOT describe product design.
    11·1 answer
  • Three return steam lines in a chemical processing plan enter a collection tank operating at a steady state at 1 bar. Steam enter
    11·1 answer
  • Water enters a leaky cylindrical tank (D = 1 ft) at a rate of 8 ft3/min. Water leaks out of the tank at a rate of 17% of the flo
    14·1 answer
  • Plot the following trig functions using subplots, choosing an appropriate layout for the number of functions displayed. The subp
    8·1 answer
  • The alternator must be operated with the battery disconnected or with the terminals at the back of the alternator
    15·2 answers
  • What are the specifications state that all work shall be done?
    10·1 answer
  • 'Energy' has the potential to:
    6·1 answer
  • Write down the tracking error such that the adaptive cruise control objective is satisfied.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!