Sorting algorithms are used to take individual elements in a dataset and put them in a specific order. Usually, sorting algorithms take a dataset and put them in either lexicographical or numerical order. Being able to sort efficiently is important in writing performant code, as many search algorithms require a sorted dataset. The common data structure operations can be seen in the following diagram:
As you can see, array sorting algorithms can have vastly different Big O notation. Choosing the correct sort algorithm for your unordered list is important when it comes to providing an optimized solution.