1 / 7

Chapter 2 (16M)

Sorting and Searching. Chapter 2 (16M). Visit for more Learning Resources. Sorting:. It is a Process by which a collection of items are placed into ascending order or in descending order.

deshawn
Download Presentation

Chapter 2 (16M)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sorting and Searching Chapter 2 (16M) Visit for more Learning Resources

  2. Sorting: • It is a Process by which a collection of items are placed into ascending order or in descending order. • Sorting is the operation of arranging data or elements in some given order, numerically or alphabetically. • The sorting is classified into two categories. 1. Internal Sorting: 2. External Sorting:

  3. Internal Sorting: • In this sorting technique, all the data is stored in main memory only . • The data can be accessed randomly. • Access of data will extremely fast. • This method is used when data items are less. • Example. • Bubble Sort • Insertion Sort • Selection Sort • Quick Sort

  4. 2. External Sorting • In this sorting, the data to be sorted is moved from secondary storage to main memory. • It is more time consuming to move records into different location. • This method is used when data items are larged. • Access of data element is slow. • Examples: • K-way Merging, Balanced Merge Sort

  5. Sorting Stability A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in sorted output as they appear in the input unsorted array. Some sorting algorithms are stable by nature like Insertion sort, Merge Sort, Bubble Sort, etc. And some sorting algorithms are not, like Heap Sort, Quick Sort, etc.

  6. Sorting Techniques: • Sorting Techniques: • Bubble Sort • Insertion Sort • Selection Sort • Quick Sort • Merge Sort • Radix Sort • Shell Sort For more detail contact us

More Related