Sorting is the process of arranging logical items in ascending or descending order.we
ususlly need to sort list of numbers,alphabets and characters.computer scientist have developed dozens of different sorting algorithm.on the one hand there are a few good sorting algorithm that sort an arbitary array of size n using n log n comparision.on the other hand the algorithm sorts by key comparision.some of the algorithm are simple but relatively slow while others are faster but more complex.two properties of sorting algorithm,a sorting algorithm is called stable if it preserves the relative order of two equal elements in its input. For example we can choose to sort student records in alphabetical order of names.suuch a specially chosen piece of information is called key.
GRAPH PROBLEMS
The oldest and most interesting areas in algorithm is graph algorithm.
A graph can be thought of a collection of points.some of which are connected by line segments called edges.basic graph algorithm includes graph traversal algorithm,shortest path algorithm and topological sort.the most widely known graph problems are traveling salesman problem is the problem of finding the shortest tour through n scity that visits every city atleast once.the grph coluring problem deale with to assign smallest number of colors tovertices of a graphso that no two adjacent vertices are same colour.this problem arises in several application such as event scheduling.