One of the chief concerns in searching and sorting is speed. Often, this concern is misguided, because the sort or search takes negligible time compared to the rest of the program. For most sorting and searching applications, you should use the easiest method available . If you later find that the program is too slow because of the searching or sorting algorithm used, you can substitute another method easily. By starting with a simple method, you haven’t invested much time and effort on code that has to be replaced.
One measure of the speed of a sorting or searching algorithm is the number of operations that must be performed in the best, average,