why study sorting algorithmsmuch of this focuses on algorithms for sorting collection of objects given collectionthe goal is to rearrange the elements so that they are ordered from smallest to largest (or to produce new copy of the sequence with such an orderas we did when studying priority queues (see section )we assume that such consistent order exists in pythonthe natural order of objects is typically defined using the operator having following propertiesirreflexive propertyk  transitive propertyif and then the transitive property is important as it allows us to infer the outcome of certain comparisons without taking the time to perform those comparisonsthereby leading to more efficient algorithms sorting is among the most importantand well studiedof computing problems data sets are often stored in sorted orderfor exampleto allow for efficient searches with the binary search algorithm (see section many advanced algorithms for variety of problems rely on sorting as subroutine python has built-in support for sorting datain the form of the sort method of the list class that rearranges the contents of listand the built-in sorted function that produces new list containing the elements of an arbitrary collection in sorted order those built-in functions use advanced algorithms (some of which we will describe in this and they are highly optimized programmer should typically rely on calls to the built-in sorting functionsas it is rare to have special enough circumstance to warrant implementing sorting algorithm from scratch with that saidit remains important to have deep understanding of sorting algorithms most immediatelywhen calling the built-in functionit is good to know what to expect in terms of efficiency and how that may depend upon the initial order of elements or the type of objects that are being sorted more generallythe ideas and approaches that have led to advances in the development of sorting algorithm carry over to algorithm development in many other areas of computing we have introduced several sorting algorithms already in this bookinsertion-sort (see sections and selection-sort (see section bubble-sort (see exercise - heap-sort (see section in this we present four other sorting algorithmscalled merge-sortquick-sortbucket-sortand radix-sortand then discuss the advantages and disadvantages of the various algorithms in section in section we will explore another technique used in python for sorting data according to an order other than the natural order defined by the operator