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
Which of the following explains the purpose of a convertible screwdriver?
aliya0001 [1]

Answer:

The correct option is;

To be able to switch between different heads quickly and easily

Explanation:

A screwdriver is a tool or device that has a grip handle which surrounds an extension shaft that has a forged tip that fits into the complementary groove  on a screw head such that by turning the handle while the forged head of the screwdriver sits in a screw head, the screw is turned

A convertible screw driver is built with the capability to easily change the tip or other attributes of the screwdriver quickly.

7 0
3 years ago
In the action adventure film Indiana Jones and the Raiders of the Lost Ark, Indiana Jones searches for the Ark of the Covenant.
zhuklara [117]

Answer:

hshhshuwuuwhhwbbdhuuduuwhbshbd ushwhhhsbdb hsuhsheuudhhe sujehhe

7 0
3 years ago
Given the circuit at the right in which the following values are used: R1 = 20 kΩ, R2 = 12 kΩ, C = 10 µ F, and ε = 25 V. You clo
agasfer [191]

Answer:

a.) I = 7.8 × 10^-4 A

b.) V(20) = 9.3 × 10^-43 V

Explanation:

Given that the

R1 = 20 kΩ,

R2 = 12 kΩ,

C = 10 µ F, and

ε = 25 V.

R1 and R2 are in series with each other.

Let us first find the equivalent resistance R

R = R1 + R2

R = 20 + 12 = 32 kΩ

At t = 0, V = 25v

From ohms law, V = IR

Make current I the subject of formula

I = V/R

I = 25/32 × 10^3

I = 7.8 × 10^-4 A

b.) The voltage across R1 after a long time can be achieved by using the formula

V(t) = Voe^- (t/RC)

V(t) = 25e^- t/20000 × 10×10^-6

V(t) = 25e^- t/0.2

After a very long time. Let assume t = 20s. Then

V(20) = 25e^- 20/0.2

V(20) = 25e^-100

V(20) = 25 × 3.72 × 10^-44

V(20) = 9.3 × 10^-43 V

8 0
3 years ago
Technician A says that tire markings now include load ratings on tires. Technician B says that they are only included on truck t
Ludmilka [50]
Technician A is correct hope this helps
5 0
3 years ago
What are the two types of furnaces used in steel production?
Kobotan [32]

Explanation:

The two types of furnaces used in steel production are:

<u>Basic oxygen furnace </u>

In basic oxygen furnace, iron is combined with the varying amounts of the steel scrap and also small amounts of the flux in the Blast Furnace. Lance is introduced in vessel and blows about 99% of the pure oxygen causing rise in temperature to about 1700°C. This temperature melts scrap and the impurities are oxidized and results in the liquid steel.

<u>Electric arc furnace</u>

Electric arc furnace reuses existing steel. Furnace is charged with the steel scrap. It operates on basis of electrical charge between the two electrodes providing heat for process. Power is supplied through electrodes placed in furnace, which produce arc of the electricity through scrap steel which raises temperature to about 1600˚C. This temperature melts scrap and the impurities can be removed through use of the fluxes and results in the liquid steel.

3 0
4 years ago
Other questions:
  • An AM broadcast station is transmitting at its assigned frequency of 880 Khz. The carrier is modulated by a 3.5 Khz sine wave. D
    15·1 answer
  • A circuit has a source voltage of 15V and two resistors in series with a total resistance of 4000Ω .If RI has a potential drop o
    7·1 answer
  • Using three arrays: a one-dimensional array to store the students’ names, a (parallel) two-dimensional array to store the test s
    14·1 answer
  • Two synchronous motors having subtransient reactances of 0.8 and 0.25 p.u., respectively, on a base of 500 V 2 MVA are connected
    13·1 answer
  • a circular pile, 19 m long is driven into a homogeneous sand layer. The piles width is 0.5 m. The standard penetration resistanc
    6·1 answer
  • If an improvement creates no significant change in a product’s performance, then it is a(n) design improvement.
    11·2 answers
  • FOR DARKEND1<br><br>÷<br><br><br>try copy and paste​
    5·2 answers
  • How to calculate tension.
    6·1 answer
  • there are 17 toinspect in a commercial building. Each inspection takes 40 min. How many will the full inspection take
    9·1 answer
  • Using data in Appendix A ,calculate the number of atoms in 1 tonne of iron
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!