Harry bhai pura din k baad last m aapke paas aake samajh aaya....last m while loop m se nikalne nhi aa rha tha ..j=-1,nhi kr pa rhe the..finally pura clear ho gya!!LOVE YOU
Harry Sir.. its a humble request to u plz continue your machine learning playlist to some intermediate or advance level concepts.. I would be very thankful to you... 😄😄
With the help of two pointers ( Iterators) we simply take element by element from the right side of the partition and j will get decrement towards left side untill it either it becomes negative or will become less than key Once this is done then we'll increase the partition and hence this way it will add an element at the appropriate place.
Thankyou so much for your efforts in making all these videos and teaching us all these concepts for free... It helps us alot... Thankyou so much... God bless you and stay safe Harry bhaiyya...❤️😇🤗
your videos are extremely helpful please make videos on angular projects and .net project real time projects.. Your channel is the best..🖤🖤🖤love the way u explain...
Sir, I am Yash me aap ko request karta hu ki aap python ko idle me video ko banaye or Kuch project ko be. please sir ye Mera humble request hai aap ko...
Mind-blowing bhaiya , I will say firstly I thought it's easy to understand then, later on I thought it getting complex ( when you said > ) but later on you made the it so easy to understand . Thank you very much bhaiya , you language you attitude I follow it from the Start of your RU-vid channel you didn't change yourself that's the thing makes me surprise .
Bhaiya as you say that after watching this video you will fully understand the concept, I will must say that yes I understood it very well and now I can also explain it to others also. Thank you very much
// my Logic for Insertion Sort void insertion_Sort(int *array, int n) { for (int i = 0; i < n - 1; i++) // possibilty for comparing every element to its precedings { for (int j = i + 1; j > 0; j--) { if (array[j-1] > array[j]) { swap(&array[j-1], &array[j]); } } } }
You are the best 👍💯 i was watching Apna College video that video was also good but not more than this. As you used a key variable makes this code easier to underestand
*INSERTION SORT* def printArr(arr): for i in arr: print(i,end="\t") print() def insertionSort(a): for i in range(1,len(a)-1): key=a[i]; j=i-1; while(j>=0 and a[j] > key): a[j+1]=a[j]; j-=1; a[j+1]=key; if __name__=='__main__': a=[7,10,2,6,9]; print("array before sorting"); printArr(a); print("array after sorting"); insertionSort(a) printArr(a)