all the algorithms in this execute in ( time neverthelesssome can be substantially faster than others an invariant is condition that remains unchanged while an algorithm runs the bubble sort is the least efficientbut the simplestsort the insertion sort is the most commonly used of the ( sorts described in this sort is stable if the order of elements with the same key is retained none of the sorts in this require more than single temporary variablein addition to the original array questions these questions are intended as self-test for readers answers may be found in appendix computer sorting algorithms are more limited than humans in that humans are better at inventing new algorithms computers can handle only fixed amount of data humans know what to sortwhereas computers need to be told computers can compare only two things at time the two basic operations in simple sorting are items and them (or sometimes them true or falsethe bubble sort always ends up comparing every item with every other item the bubble sort algorithm alternates between comparing and swapping moving and copying moving and comparing copying and comparing true or falseif there are itemsthe bubble sort makes exactly * comparisons