#71 Python Tutorial for Beginners | Selection Sort using Python

preview_player
Показать описание
Python Tutorial to learn Python programming with examples

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :

Editing Monitors :

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
Рекомендации по теме
Комментарии
Автор

No one has ever explained to me sorting and search in such a simple way.
Thanks a lot for explaining all the concepts in simple ways.

anupampatro
Автор

Accordingly to me u changed my life in programming .u are god sir ...thank u Navin sir

placement
Автор

Sir i have completed your entire course on python and it is one of the best courses to learn python available on YouTube. Your teaching makes the concepts very easy to understand. It is really commendable that such a quality of content can be accessed for free. Once again hat's off to you sir and your teaching...

nikunjlohiya
Автор

This can be a possible optimization :


def selection_sort(list):
for i in range(len(list)):
for j in range(i+1, len(list)):
if list[i] > list[j]:
list[i], list[j] = list[j], list[i]


Btw, Great video Sir as always! Thank you!!

hrishikeshhasabnis
Автор

def sort(num):
for i in range(len(num)):
for j in range(i, len(num)):
if num[j]<num[i]:
temp =num[i]
num[i]=num[j]
num[j]=temp

num=[4, 5, 3, 7, 1, 6]
sort(num)
print(num)

sir this also works. Thank you to help us by your video and technique

abhishekjaiswar
Автор

We want these types of indepth, easily discussed great topics videos like data structures, different algorithms writing and analysis techniques.. lots of love and respect for you sir 🙏🙏🙏...

chinmaydas
Автор

Thank you, Sir, you have explained in an easy way.

rajmohammed
Автор

analysed the code using debugger and understood the concept. Love your videos, Sir.

mdbhardwaj
Автор

def sort(nums):
for i in range(len(nums) - 1, 0, -1):
for j in range (i):
if nums[j] < nums[j + 1]:
continue
else:

nums[j+1], nums[j] = nums[j], nums[j+1]



nums = [5, 8, 9, 71, 10, 2, 589, 1, 0]
sort(nums)
print(nums)

harshaddaingade
Автор

for i in range(10):
print("At the end to watching all the video, I want to say, take my salam inside my heart. Thank you so much Navin Reddy Sir.God bless you.")

hasibkhan
Автор

if you want to clear the video concept look the output of my coding: Thank you Navin Sir
def sort(l):
n = len(l)
for i in range(n):
print("The value of i", i)
minpos = i
for j in range(i+1, n):
print("Print the value of j", j)
if l[j]< l[minpos]:
minpos = j

l[i], l[minpos] = l[minpos], l[i]

list = [2, 5, 6, 7, 4, 3]
sort(list)
print("Sorted list is")
for i in range(len(list)):
print(list[i])

o/p:
The value of i 0
Print the value of j 1
Print the value of j 2
Print the value of j 3
Print the value of j 4
Print the value of j 5
The value of i 1
Print the value of j 2
Print the value of j 3
Print the value of j 4
Print the value of j 5
The value of i 2
Print the value of j 3
Print the value of j 4
Print the value of j 5
The value of i 3
Print the value of j 4
Print the value of j 5
The value of i 4
Print the value of j 5
The value of i 5
Sorted list is
2
3
4
5
6
7

Process finished with exit code 0

FactsDiscoveryyoutube
Автор

after all u r the best trainer as an indian youtuber

sampratickroy
Автор

Thank you so much sir i have watched previous all the python videos🙏 and they are great

krishnapawar
Автор

this video made me clear about the topic

sailapellakuru
Автор

All videos are awesome sir. Outstanding teaching way.

rohinisingh
Автор

I never knew that sorting is that simple. Thank you so much sir.

madhvishrivastava
Автор

thank you so much ..Can you please upload the data structures like (linked list, stack, queue, tree, graphs) implementation in python as well ..your explanation is always to the point ...You are a great teacher..Respect

deepaktiwari
Автор

Very nice bro, I am really impressed...

mudassirfarooq
Автор

Thanks sir,
I completed my whole concept of python from you
Love from Pakistan

infotech
Автор

Thank you sir so much, now we are able to refined the code up to somehow it' s by watching your videos. So i would like to share the script that took me almost 2 hours and get me succeed in it.
def selct(x):
for i in range(len(x)):
#minIndex=i (No need of this)
for k in range(i, len(x)):
if x[k] < x[i]:
(x[k], x[i])=(x[i], x[k])
print(x)

x=[2, 4, 5, 1000, 7, 8, 1, 99]
selct(x)

fawadkhan