34.4 Sorting Arrays

Sorting algorithms are an important topic in computer science. A sorting algorithm is an algorithm that puts elements of an array in a certain order. There are many sorting algorithms and each one of them has particular strengths and weaknesses.

Most sorting algorithms work by comparing the elements of the array. They are usually evaluated by their efficiency and their memory requirements.

There are many sorting algorithms. Some of them are:

the bubble sort algorithm
the modified bubble sort algorithm
the selection sort algorithm
the insertion sort algorithm
the heap sort algorithm
the merge sort algorithm
the quicksort algorithm

As regards their efficiency, the bubble sort algorithm is considered the least efficient, ...

Get Visual Basic and Algorithmic Thinking for the Complete Beginner now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.