Python Tutorials - Selection Sort Using Python | Sorting Algorithm | Learn Python Programming

Publicado em: 17 Novembro 2020
no canal de: CodeAsItIs
175
2

Python Tutorial - Selection Sort Using Python | Learn Python Programming
In this Python programming video tutorial we will learn about selection sort algorithm in detail.
#python #selectionsort #pythonsort
Selection sort is an in placed comparison based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end.

Here you can see how to sort list of numbers using selection sort algorithm.

Here you can see how to write program using selection sort algorithm.
example:
56 3 2 78 6 0
first iteration:
min_val = 0,
so swap it to first index(swap 56 and 0)
output: 0 3 2 78 6 56

second iteration:
min_val = 2
so,swap 3 and 2
output: 0 2 3 78 6 56

third iteration:
min_val =3
so swap 3 with 3
output: 0 2 3 78 6 56

4th iteration:
min_val =6
so swap 78 and 6
output: 0 2 3 6 78 56

5th iteration:
min_val =56
swap 78 and 56
output is: 0 2 3 6 56 78

6th iteration:
min_val = 78
so swap 78 with 78
output is: 0 2 3 6 56 78.

All demo files can be present at Github :- https://github.com/codeasitis/Python
**********
To learn Python, start our Python Playlist HERE:
   • Python Basics  

Subscribe to CodeAsItIs:    / codeasitis  

**********
You can write to me at - codeasitis@gmail.com
**********
Connect with us!

Facebook:   / code.asitis.7  
Instagram:   / codeasitis  
Twitter:   / codeasitis1  

**********

Thank you!
CodeAsItIs


Nesta página do site você pode assistir ao vídeo on-line Python Tutorials - Selection Sort Using Python | Sorting Algorithm | Learn Python Programming duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário CodeAsItIs 17 Novembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 175 vezes e gostou 2 espectadores. Boa visualização!