I couldn't understand this algorithm. Please help me to do this.
![I couldnt understand this algorithm Please help me to do this class=](https://us-static.z-dn.net/files/d04/82f0950d918654f83bc4ed5f2cec36bd.jpg)
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.