Sorting and Searching

 What is Sorting and Why we need Sorting?
Sorting means arranging numbers or objects or things in specific order either in ascending or descending.
             Now the question is why we need sorting? We need sorting because when we have hundreds of thousands of comparable values stored in array or linked list then for efficient searching we need to sort that linked list or array data. For example if some ask you to find smallest number form 100 numbers stored in data structure, then it will be difficult for you to find smallest number for 100 numbers. If you will sort that data structure in ascending order that means 1st number in that data structure will be Smallest one.  

Types of Sorting Algorithms : -

  •   Selection Sort Algorithm.
  •   Insertion Sort Algorithm.
  •   Bubble Sort Algorithm.
  •   Quick Sort Algorithm.
  •   Merge Sort Algorithm.
  •   Shell Sort Algorithm.
  •   Heap Sort Algorithm.
What is Search?
Search means to find some form many.

Type of Searching Algorithms : -

  •   Sequential Search.
  •   Binary Search.


Click here for programs.

Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons