Lec-45: SELECTION SORT in PYTHON 🐍 | DSA Concepts in PYTHON 🐍

  Рет қаралды 36,502

Gate Smashers

Gate Smashers

Күн бұрын

Пікірлер: 28
@Niki-ue6fk
@Niki-ue6fk 6 ай бұрын
Hi, Thanks for the explanation . Somehow , i think , a little change in indentation needed. Bcz, its not working for all the elements. so we have to change the index like i have shown below. def selectionsort(arr): n = len(arr) for i in range(n-1): mini = i for j in range(i+1,n): #
@RoshanSingh-kj4fy
@RoshanSingh-kj4fy 3 ай бұрын
I've attended multiple classes but ur simplicity is osam
@JupudiManikantaSwamy
@JupudiManikantaSwamy 11 ай бұрын
I appreciate you taking the time to explain that. Thank you.
@unknownstudentkkn
@unknownstudentkkn 10 ай бұрын
sir iss video ko agar aap edit ya delete kar denge to bahut achha hoga kyunki isme error hai jisko aur bhi logo ne point out kiya hai aur jo pahli bar dekhenge wo samjhenge ki likha hua code hi sahi hai isliye please take a proper action..... swapping second loop complete hone ke baad ki jayegi...
@masterhipster8358
@masterhipster8358 9 ай бұрын
correct
@Deeksha7star
@Deeksha7star Жыл бұрын
Sir ye swapping j loop ke bhar m hogi
@Rohan-rr7jw
@Rohan-rr7jw Жыл бұрын
Yes bro you are right
@punitarora8664
@punitarora8664 2 ай бұрын
Great explanation sir
@yajushvyas2916
@yajushvyas2916 11 ай бұрын
Sir there is a mistake in pass 2, at 07:59 mini = 2 so after swapping in 09:07 when we will compare 42 we will compare it with 41 because mini = 2 and arr1[mini] = 41
@Hello_BhaiG
@Hello_BhaiG 3 ай бұрын
bhai code hi galat likha hai sir ne
@kareenatulyani24
@kareenatulyani24 10 ай бұрын
Thankuuu sir❤
@aniketdev1157
@aniketdev1157 8 ай бұрын
Thank you so much sir 🙏❤️
@wbinvestor7717
@wbinvestor7717 10 ай бұрын
There is a typing mistake in line no 8. The swapping must be done in the same indentation of the second for loop. Hope everyone evaluates correctly.
@talhajawad020
@talhajawad020 8 ай бұрын
where the increment code of j exists in program?
@T_E_D_D_Y_0_0_7
@T_E_D_D_Y_0_0_7 6 ай бұрын
In python the by default increment value is 1 so you can omit that part if you want to increase by 1.
@gtsumit7067
@gtsumit7067 7 ай бұрын
Hey, The line which you use for swapping will inside the first loop only as it's inside the second loop it could give wrong answer when there is a bigger array
@Hello_BhaiG
@Hello_BhaiG 3 ай бұрын
yup bro, the code is wrong. because of this video i waste my 2 hours, why i cant understand the logic and then after i realise the code is wrong so shameful teacher
@argaming9110
@argaming9110 Жыл бұрын
Thanks sir
@niharikakadiyan8994
@niharikakadiyan8994 Жыл бұрын
Sir baaki sorting program b karwa do ... pgt k exam se phle
@Shaikh_Imran9977
@Shaikh_Imran9977 10 ай бұрын
You consider n=5 but you run Nested For loop of j just 4 times why?
@shitikanthparida8270
@shitikanthparida8270 Жыл бұрын
The 1st comment in Sir's video ❤️
@Deeksha7star
@Deeksha7star Жыл бұрын
Sir heap sort b krado plz
@RajRaj-sp7xw
@RajRaj-sp7xw 5 ай бұрын
This code is not working for more than 5 elements.Could u help sir 🙏
@Hello_BhaiG
@Hello_BhaiG 3 ай бұрын
swapping wali 8th line inner loop se hata kar outer loop me laado, code me mistake h sir k
@AmishaJaiswal-qm4ek
@AmishaJaiswal-qm4ek 5 ай бұрын
it should be arr[j]
@unscinfinity3337
@unscinfinity3337 2 ай бұрын
Mini= I likha hain dekho
@md.mansoor6446
@md.mansoor6446 3 ай бұрын
This program is not giving proper output for some arrays
@jyotibhardwaj293
@jyotibhardwaj293 Жыл бұрын
Sir baki bi kerwa dijiye
Lec-50: Quick Sort in Python 🐍 with Code | DSA in Python 🐍
12:17
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 60 МЛН
This Game Is Wild...
00:19
MrBeast
Рет қаралды 186 МЛН
Lec-44: INSERTION SORT in PYTHON 🐍 | DSA Concepts in Python 🐍
8:58
Sorts 5 Shell Sort
6:53
RobEdwards
Рет қаралды 196 М.
Python Tutorials - Selection Sort Algorithm | Example
14:10
Amulya's Academy
Рет қаралды 140 М.
Python Program #41 - Sort Numbers using Selection Sort in Python
8:44
Programming For Beginners
Рет қаралды 2,1 М.
Quicksort In Python Explained (With Example And Code)
14:13
FelixTechTips
Рет қаралды 157 М.
7.5 Selection Sort in Data Structure | Selection Sort Algorithm with C Program
17:49
Jenny's Lectures CS IT
Рет қаралды 1,4 МЛН
Lec-48: Binary Search 👀 in Python 🐍 | Complete DSA in Python
7:31
Bubble Sort - Data Structures & Algorithms Tutorial Python #14
15:09