its absolutely best. just for a little more clarification, i think we can use also "else" with "while". i know , we don't use it much, still for understanding we can give it a shot. def insertionsort(arr1): l = len(arr1) for i in range(1,l): key = arr1[i] j = i-1 while j >= 0 and key < arr1[j]: arr1[j+1] = arr1[j] j = j-1 else: arr1[j+1] = key arr1 = [40,30,20,10] insertionsort(arr1) print(arr1)
@vaishnav.rathod11 ай бұрын
Sir woh function mein return statement bhi ayega Nhi toh woh change hi nhi hoga. Rest is nicely explained. 👍
@adityaborate61749 ай бұрын
Its not really necessary to write 'return' statement explicitly, because we can, let's say create a list l, then call the function created on next line, and finlly write print(l). This also works.
@MKD.369 Жыл бұрын
Sir please make a video on implementation of stack using list.I will be very greatful to you 🙏
@gouravsaini4831 Жыл бұрын
Thank u so much sir...I was waiting for this for long time....plz sir bubble and selection sort bhi Kara dijiye.... HPSC ke exam k liye....🙏
@amrapalichakraborty31063 ай бұрын
the way sir says thank you at the last🥺🥺🥺🥺
@Hemesh_KАй бұрын
Thank you sir ❤
@rittikasarkar831824 күн бұрын
i have a doubt sir...where u r incrementing i? how it shifted to 20?
@chamarthykoushik204 Жыл бұрын
First comment sir Please don't stop posting python dsa videos Thank you ♥️
@mtkhkmnb11 ай бұрын
Pl dont stop this dsa with python sir❤❤❤❤
@suman_chouhan8 ай бұрын
nice explanation, thanks
@harshalsonawane46249 ай бұрын
best video soo farr
@shaikshaheen54968 ай бұрын
Great explanation sir
@jyotibhardwaj293 Жыл бұрын
Sir baki sorting bi python me kerwa dijiye with algorithms 8:20
@babamusic8538 Жыл бұрын
Sir DSA ka playlist bana dijiye sir vdo total nahi mil pa Raha hai
@RitikKumar-ls2it Жыл бұрын
Sir aapki Old Video Khaa melagi
@nisarakhtar54804 ай бұрын
may god blessed your mod dad'
@shrishtykumari2408 Жыл бұрын
Sir, app bhut ptle ho gye
@jakebenstade Жыл бұрын
Apka weight Kam ho gaya sir😅
@RitikKumar-ls2it Жыл бұрын
Miju Start sy phadna hey
@pawankatkhede6961 Жыл бұрын
Sir itna patle hue ho gaye 😢😢
@kundankumarhakga9987 Жыл бұрын
Sir se kon kon chahta hai ki sir live classes krna sake