0% found this document useful (0 votes)
577 views

Presentation On Selection Sort

Selection sort is a simple sorting algorithm that works by iteratively finding the minimum element from the unsorted part of the array and placing it at the beginning. It divides the array into a sorted and unsorted part. In each step, the smallest element is selected from the unsorted array and swapped with the leftmost element, adding it to the sorted part. This process continues until the array is fully sorted, resulting in either ascending or descending order. However, selection sort has a time complexity of O(n^2) and is not suitable for large datasets due to its inefficiency.

Uploaded by

Samixa Timalcena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
577 views

Presentation On Selection Sort

Selection sort is a simple sorting algorithm that works by iteratively finding the minimum element from the unsorted part of the array and placing it at the beginning. It divides the array into a sorted and unsorted part. In each step, the smallest element is selected from the unsorted array and swapped with the leftmost element, adding it to the sorted part. This process continues until the array is fully sorted, resulting in either ascending or descending order. However, selection sort has a time complexity of O(n^2) and is not suitable for large datasets due to its inefficiency.

Uploaded by

Samixa Timalcena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Presentation

on
Selection Sort
Basics of Selection Sort:

1. It is Simple sorting algorithm.


2. It finds the minimum or maximum element in an
unsorted array and then putting it in its correct
position.
3.It is also comparison-based algorithm in which the
list is divided into two parts:
 i. The sorted part
 ii. The unsorted part
Process of Selection sort:

The smallest element is selected from the unsorted


array and swapped with the leftmost element.
ie, That element becomes a part of the sorted array.
 This process continues moving unsorted array
boundary by one element to the right until the final
result.
Result can be either in ascending or descending
order.
Pictorial Representation of Selection Sort:
Procedures of Selection Sorting:

1. Comparison: The times of comparison in a n value


array is (n(n-1))/2.
2. Value Assignment: The times of value assignment is
between 0 to 3(n-1).
3. Exchanging: The times need is between
0 to (n-1).
Hence, This algorithm is not suitable for large data
sets as its average and worst case complexities are of
Ο(n2), where  n is the number of items.
Disadvantage os Selection Sort:

1. The algorithm of Selection sort will vary in different


kinds of data structures.
2. If the data structure is stack or queue, the algorithm
is different.
3. The algorithm can not run in-place, the execution
need extra memory in computer.
4. The algorithm need extra memory to temporary
store the value which need to be changed in the swap
method.

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