0% found this document useful (0 votes)
136 views2 pages

Insertion Sort

The document discusses several sorting algorithms: 1. Insertion sort works by sequentially comparing elements and placing them in the correct position in sorted order. 2. Selection sort finds the minimum element and places it at the beginning of the unsorted portion of the array. 3. Shell sort improves on insertion sort by sorting elements far apart from each other and reducing the interval to sort. 4. Merge sort uses a divide and conquer approach to split the array into halves, recursively sort the halves, and merge the results. 5. Quicksort also uses divide and conquer to partition the array into subarrays and recursively sort the elements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views2 pages

Insertion Sort

The document discusses several sorting algorithms: 1. Insertion sort works by sequentially comparing elements and placing them in the correct position in sorted order. 2. Selection sort finds the minimum element and places it at the beginning of the unsorted portion of the array. 3. Shell sort improves on insertion sort by sorting elements far apart from each other and reducing the interval to sort. 4. Merge sort uses a divide and conquer approach to split the array into halves, recursively sort the halves, and merge the results. 5. Quicksort also uses divide and conquer to partition the array into subarrays and recursively sort the elements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Insertion Sort It is based on the idea that one The array elements are

element from the input compared with each other


elements is consumed in each sequentially and then
iteration to find its correct arranged simultaneously in
position. some particular order.
Selection Sort It sorts an array by repeatedly It is a comparison sorting
finding the minimum element algorithm that is used to sort a
from unsorted part and putting random list of items in
it at the beginning ascending order. 
Shell Sort It is an improvement of It is an algorithm that first sorts
insertion sort. It breaks the the elements far apart from
original list into a number of each other and successively
smaller sub lists, each of which reduces the interval between
is sorted using an insertion sort. the elements to be sorted
Merge Sort It is a sorting technique based It divides the input
on divide and conquer array into two halves,
technique.
calls itself for the two
halves, and then
merges the two sorted
halves
Quick Sort It is a highly efficient sorting It is based on divide and
algorithm and is based on conquer approach in
partitioning of array of data into
which the array is split
smaller arrays
into sub arrays and
these sub-arrays are
recursively called to sort
the elements

Essay

Searching Algorithms are designed to retrieve an element from any data structure
where it is used. These algorithms are generally classified into two categories i.e.
Sequential Search and Interval Search. The worst-case time complexity of
searching algorithm is O(N). And there is no stable and unstable searching
algorithms. While Sorting Algorithm, is used to arranging the data of list or array
into some specific order. There are two different categories in sorting. These are
Internal and External Sorting. The worst-case time complexity of many sorting
algorithms like Bubble Sort, Insertion Sort, Selection Sort, and Quick Sort is O(N 2).
And Bubble Sort, Insertion Sort, Merge Sort etc are the stable sorting algorithms
whereas Quick Sort, Heap Sort etc are the unstable sorting algorithms.
THOUGHTS

One of the seemingly most-overused words in tech is “algorithm”.


From the apps on the phone to the sensors in the wearables and
how posts appear in the Facebook News Feed, you’ll be pushed to
find a service that isn’t powered by some form of algorithm. I am
too fascinated how algorithms made an impact in our day-to-day
lives. And I now know and understood the common search methods.

Unit 4

THOUGHTS

The tree data structure enables us to write many interesting algorithms. For me, this unit is very
much interesting. I find it easy solving and answering all the learning activity questions. This is a
stress – free unit for me.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy