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]
3 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]3 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
Which symbol should be used for the given scenario?
Firdavs [7]

Answer:

speed square

Explanation:

4 0
2 years ago
What are the 2 reasons an alignment should be done?
NikAS [45]

Answer:

because it will keep the tires in much better shape and it can improve the handling and keep your  car from pulling to one side

Explanation:

5 0
3 years ago
Is a diesel truck less expensive to drive than a gas truck?
MArishka [77]

Answer:

Typically, diesel trucks cost more than those with gas engines, especially when you're first buying them, as diesel is usually featured as an add-on for gas-powered cars. Diesel add-ons can cost over $5,000 for midsize trucks and around $10,000 for heavy-duty trucks.

Explanation:

Make me brain pls

3 0
2 years ago
A spring-loaded piston-cylinder contains 1 kg of carbon dioxide. This system is heated from 104 kPa and 25 °C to 1,068 kPa and 3
labwork [276]

Answer:

Q = -68.859 kJ

Explanation:

given details

mass co_2 = 1 kg

initial pressure P_1 = 104 kPa

Temperature T_1 = 25 Degree C = 25+ 273 K = 298 K

final pressure P_2 = 1068 kPa

Temperature T_2 = 311 Degree C = 311+ 273 K = 584 K

we know that

molecular mass of co_2 = 44

R = 8.314/44 = 0.189 kJ/kg K

c_v = 0.657 kJ/kgK

from ideal gas equation

PV =mRT

V_1 = \frac{m RT_1}{P_1}

       =\frac{1*0.189*298}{104}

V_1 = 0.5415 m3

V_2 = \frac{m RT_2}{P_2}

     =\frac{1*0.189*584}{1068}

V_1 = 0.1033 m3

WORK DONE

W =P_{avg}*{V_2-V_1}

w = 586*(0.1033 -0.514)

W =256.76 kJ

INTERNAL ENERGY IS

\Delta U  = m *c_v*{V_2-V_1}

\Delta U  = 1*0.657*(584-298)

\Delta U  =187.902 kJ

HEAT TRANSFER

Q = \Delta U  +W

   = 187.902 +(-256.46)

Q = -68.859 kJ

7 0
3 years ago
Products that are in the process of being manufactured but are not yet complete are called:
vazorg [7]

Answer:

Those products are generally called Work in Process WIP

Explanation:

Work in process (WIP), or work in progress (WIP), goods in process, or in-process inventory in a manufacturing industry/company refer to the company's partially finished goods waiting for completion and eventual sale or the value of these items.

These items are either just being produced or require further processing (like purification, separation, packaging or handling) in a queue or a buffer storage.

6 0
3 years ago
Other questions:
  • A 1-lb collar is attached to a spring and slides without friction along a circular rod in a vertical plane. The spring has an un
    6·1 answer
  • How does a carburetor work?
    7·1 answer
  • A driver is traveling at 52 mi/h on a wet road. an object is spotted on the road 415 ft ahead and the driver is able to come to
    5·2 answers
  • An electric field is expressed in rectangular coordinates by E = 6x2ax + 6y ay +4az V/m.Find:a) VMN if point M and N are specifi
    9·1 answer
  • What type of fuel does a 2 cycle engine use
    5·1 answer
  • An air-conditioning system operates at a total pressure of 1 atm and consists of a heating section and a humidifier that supplie
    15·1 answer
  • What energy type is represented in the picture?
    6·2 answers
  • 14. The flow water in a 10-in Schedule 40 pipe is to be metered. The temperature of the water is
    8·1 answer
  • In the following scenario, what could the engineers have done to keep the bridge from collapsing?
    8·1 answer
  • What person at the construction worksite keeps workers safe from asbestos exposure?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!