PRAN PRAN
  • 19-05-2019
  • Computers and Technology
contestada

I couldn't understand this algorithm. Please help me to do this.​

I couldnt understand this algorithm Please help me to do this class=

Respuesta :

tonb
tonb tonb
  • 20-05-2019

Answer:

This is bubble sort, to alphabetize an array of strings.

Explanation:

The algorithm walks through the array, and compares one value to the next. If the 'current' value is larger than the next, it swaps them, and starts all over.

So a value that lexographically is first to be alphabetized, will 'bubble' all the way to the top.

Answer Link

Otras preguntas

what names apply to 12 2/3
If all of the diagonals are drawn from a vertex of a quadrilateral, how many triangles are formed? A.1 B.2 C.3 D.4
How do you respond to a short answer question?
how many terms are in the algebraic expression 2y+3x-5x2-9
kellen's bill at a restaurant before tax and tip is $22.00. If tax is 5.25% and he wants to leave 15% of the bill including the tax for a tip, how much will he
Which components of the atom have no charge
-3x+4=-17show how you did it
what does Odysseus do to convince the swineherd that Odysseus is coming back?
2 advantages and disadvantages of electric or hybrid vehicles
a vegetarian needs to know