7.11 Shell Sort | Sorting Algorithms | Full explanation with Code | DSA Course

  Рет қаралды 375,750

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

Jennys Lectures DSA with Java Course Enrollment link: www.jennyslect...
Step by step instructions showing how Shell Sort works with example and its code. Analysis of shell sort has also been done.
DSA Full Course: https: • Data Structures and Al...
******************************************
See Complete Playlists:
C Programming Course: • Programming in C
C++ Programming: • C++ Complete Course
Python Full Course: • Python - Basic to Advance
Printing Pattern in C: • Printing Pattern Progr...
DAA Course: • Design and Analysis of...
Placement Series: • Placements Series
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
*************************************************
Connect & Contact Me:
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/...
Instagram: / jayantikhatrilamba
#shellsort #jennyslectures #dsa

Пікірлер: 368
@mahimsd7645
@mahimsd7645 5 жыл бұрын
Shell Sort... For the first time I have seen such an excellent explanation of Shell Sort... Gr8 work ... God bless you !!!!!!
@chuchaftw
@chuchaftw 3 жыл бұрын
I dont know why university professors get so complicated when it comes to teaching. This was so the point and understandable compared to my professor. THANK YOU
@RockStar-Siblings
@RockStar-Siblings 11 ай бұрын
Exactly they make easy things complicated and difficult things even more complex making study frustraring and irritating this losing interest in the subject 🤦‍♀️
@meeett
@meeett 4 күн бұрын
Someone told me this thing a while ago that lecturers explain topics the same way they understood them first
@owaistnt
@owaistnt 5 жыл бұрын
Thank you for creating such a beautiful content. You take things step by step and that is very easy to consume. I have understood it so well I will never forget shell sort now!!
@abhisheksoni3924
@abhisheksoni3924 4 жыл бұрын
SIMP
@tadeob_
@tadeob_ 3 жыл бұрын
@@abhisheksoni3924 stfu
@nabeegh8766
@nabeegh8766 Жыл бұрын
tharki saley
@biswamohandwari6460
@biswamohandwari6460 4 жыл бұрын
Don't speak loudly use a microphone instead , you voice is premium level, especially after teaching a long day at your college
@xbonyt.
@xbonyt. Жыл бұрын
😂
@_deepak_deepu
@_deepak_deepu 8 ай бұрын
See properly she is using Mic
@abhaybitle3693
@abhaybitle3693 2 ай бұрын
Sun na hai suno nhi to m......c 😂
@priyanshsingh4322
@priyanshsingh4322 2 күн бұрын
Simp
@knowmanav
@knowmanav 5 жыл бұрын
Here is a code I wrote for reference. Note: I have used gap as variable k #include #include int j; int k; int n; int temp; int array[30]; int i; void shellsort() { for(i=n/2;i>0;i=i/2) { for(j=i;j=0;k=k-1) { if(array[i+k]>=array[k]) { break; } else { temp=array[k]; array[k]=array[k+i]; array[k+i]=temp; } } } } } int main() { printf("Enter the number of elements: "); scanf("%d",&n); printf("Enter the elements: "); for(i=0;i
@amanpratapsingh1243
@amanpratapsingh1243 4 жыл бұрын
In the k for loop It should be k=k-i inplace of k = k-1
@subhadipbardhan3801
@subhadipbardhan3801 3 жыл бұрын
The program shown in video there is three bug in 1st loop and 3rd loop, it should be for(gap=n/2; gap>=1; gap=gap/2) , for(i=j-gap; i>=0; i=i-gap ). & at last nice understanding process 🤘.
@haithem3831
@haithem3831 2 жыл бұрын
I did not understand the 3rd loop can u explained please
@pegasus3561
@pegasus3561 2 жыл бұрын
That is not a big mistake 🤔
@sakshamdwivedi2527
@sakshamdwivedi2527 Жыл бұрын
She has only written it casually... Although she has already pointed it too... It means that you haven't watched it carefully bro 😁
@dostirathi8254
@dostirathi8254 5 ай бұрын
n=9 so how n/2=4
@debosmitabanerjee1232
@debosmitabanerjee1232 11 күн бұрын
@@dostirathi8254 hi! this is because we're using the Math.floor() method (i code in java so that's what we use here) to round off any decimal result to its corresponding floor value. The lecturer in this video mentioned at the start that floor values would be used for calculating the gap. i hope this helped you out!
@vaishaliruhela1408
@vaishaliruhela1408 5 жыл бұрын
The best explanation ever... U had covered all the concepts regarding dis topics.. This is the best part of ur tutorial... Keep it up.. Thnx alot🙏
@k.s.v7652
@k.s.v7652 Ай бұрын
I greatly appreciate your teaching, ma'am. You are truly one of the best.
@ShubhamVerma-hw4uj
@ShubhamVerma-hw4uj 3 жыл бұрын
god level explanation
@thisisbipin
@thisisbipin 4 жыл бұрын
Hey guys which are looking for any other video on shell sort!!!! I challenge you for finding any other video explaining shell sort better than this. Thankyou Maam a lot. You explained it sooo deeeeeply. I understood the concept. btw you got a new subscriber :)
@bismeetsingh352
@bismeetsingh352 4 жыл бұрын
Half way though, the code was done, thats how good the explanation was.
@deepakborah8335
@deepakborah8335 5 жыл бұрын
One of the best video on shell sort with working logic.
@NurHabo
@NurHabo 9 ай бұрын
I don't get such type of explanation and understanding from my lectures they always complicate simple things into complex but you are more than professors for me Thank you jenny...🙏🙏🙏
@sriramcharanvarmapenmetsa9763
@sriramcharanvarmapenmetsa9763 7 ай бұрын
But.... I didnt ask did i?😢😢😢😢
@piyushahir175
@piyushahir175 4 жыл бұрын
I get confused 😂 की मैं आपको देखू या बोर्ड पे देखू। By the way you doned it very well, i easily understand what you want to explain. Thank You Madam❤
@joyontasaha4578
@joyontasaha4578 5 жыл бұрын
Great piece of work. Working procedure and source code lucidly explained. However, Complexity part remains ambiguous which could have been explained by giving 1-2 mins more.
@jashangill4191
@jashangill4191 2 жыл бұрын
Love from Canada 🇨🇦, your lecture is amazing
@rachithapr4720
@rachithapr4720 3 жыл бұрын
No book has ever explained as much as this person did. Great video! Time complexity could have been explained with more details.
@prithvijitbasak
@prithvijitbasak 3 жыл бұрын
Here the code is wrong In the first for loop it will be: for(int gap=n/2;gap>=1;gap/=2) And in the 3rd for loop it will be : for(int i=j-gap;i>=0;i=i-gap) But your explanation is great 👌🔥🔥🔥🔥
@piyushaneja7168
@piyushaneja7168 3 жыл бұрын
can we do this using only 2 loops? i got the same output, is it crt? for (int gap = n / 2; gap >= 1; gap = gap / 2) { for (int i = 0; i < n - gap; i++) { j = i + gap; if (arr[i] > arr[j]) { swap(arr[i], arr[j]); } if (i - gap >= 0) { if (arr[i - gap] > arr[i]) swap(arr[i - gap], arr[i]); } } }
@saurabhtiwari287
@saurabhtiwari287 2 жыл бұрын
@@piyushaneja7168 exactly bro but i took flag variable .
@piyushaneja7168
@piyushaneja7168 2 жыл бұрын
@@saurabhtiwari287 idk why but i didn't get this anywhere in net in which they have used only two loops. So i was bit confused..
@saurabhtiwari287
@saurabhtiwari287 2 жыл бұрын
@@piyushaneja7168 wait bro i will explain
@saurabhtiwari287
@saurabhtiwari287 2 жыл бұрын
@@piyushaneja7168 ur above code is correct if u add some more lines that is :- For every element of arr. When u swap put ur flag to 1. And when loop reached to (gap==i && flag =1) just reverse swap the gap and (i- gap) element.
@mohamedhadhoud6701
@mohamedhadhoud6701 11 ай бұрын
im so grateful , your explnation is prefect , am in Alx software engineering program i was able to solve sorting_algorithms project tasks before i even done watching all video , im able to directly coding the task 👍👍👍👍
@kanwalsajjad-wd2ju
@kanwalsajjad-wd2ju Жыл бұрын
jzakAllah Ma'am your way of teaching is amazing 🥰 literaly in one word i want to say that it was outstanding ❤💝
@amanbhadauria2881
@amanbhadauria2881 5 жыл бұрын
Amazed , this video deserves more views
@JessicaMary0702
@JessicaMary0702 5 жыл бұрын
Wow! You explain this way better than my teacher. I understand now. Thank you!
@muskantiwari698
@muskantiwari698 4 жыл бұрын
Right
@anuragprasad878
@anuragprasad878 5 жыл бұрын
The way you explain is just incredible. Loved your approach you followed for explanation :)
@AkashVerma-l7y
@AkashVerma-l7y Жыл бұрын
You actually told the intuition behind the shell sort and it's comparison with insertion sort. Thanks for that.
@user-vy3qh8tg6z
@user-vy3qh8tg6z 7 ай бұрын
I love your way of teaching ma'am 💓💓💓💓💓💓
@MotionDesignStudio
@MotionDesignStudio 4 жыл бұрын
Jenny, I was participating in a different course on data structures and when we got to Shell Sort I was confused as to why there was a comparison happening to previous values in the loop as I traversed the array. Your instruction helped me understand when the previous value was being compared. I am unsure why so many tutorials on Shell Sort do not clearly explain this very important part. Thanks for the instruction and you have inspired me to create computer science tutorials. Have a great week and stay safe.
@thesickbeat
@thesickbeat 4 жыл бұрын
Happened here as well. The backward swapping should be emphasized with this method.
@SmeetPatel-y4l
@SmeetPatel-y4l 9 ай бұрын
the best video available on internet on shell sort...salute
@arshmishra6529
@arshmishra6529 4 жыл бұрын
such a great effort of explaining all the concepts with such a great hardwork thanks for making our learning more interesting.
@RameezKhalil-pn4yo
@RameezKhalil-pn4yo 4 жыл бұрын
That is absolutely great, the way you trace the code was very good, it just not only cleared the confusion , but, also vanish the confusion of control flow depending on the conditions, thank you..
@foodfairyshi
@foodfairyshi 2 жыл бұрын
Very good explanation. Thank you so much for making this video. It is very useful and I am happy that I could finally understand this logic.
@jaiharini7861
@jaiharini7861 Жыл бұрын
I am really very much greatful to you,since your lecture is more useful even before evenings of exams,so Thanks for being more simple with your lecture to the students. I wish you the happiest new and a prosperous year ahead and ever get succeeded in all your upcoming steps.
@saikashyap7682
@saikashyap7682 Жыл бұрын
Soo good, You clearly noted the point where I got stuck and explained it in parallel with the code 👌
@mennamahmoud570
@mennamahmoud570 2 жыл бұрын
Your Tracing has made it much easier, so thank you very much.
@moayyadarz2965
@moayyadarz2965 4 жыл бұрын
your way of explaining the ideas and handling them is so amazing and brilliant I do really thank you :) Allah bless you
@ShaliniSingh-xc5rn
@ShaliniSingh-xc5rn 5 жыл бұрын
Ur teaching style is awesome mam.. U r doing great work for us.. Thank u once again.. . God bless u
@vedantparmar5549
@vedantparmar5549 2 жыл бұрын
Thankyou Mam, For Such a beautiful explanation.I have not found such a great video of shell sort as yours.Thankyou Very Much😁
@riellezyphe5014
@riellezyphe5014 5 жыл бұрын
Thank you so so much for explaining this. I tried to understand it for a day before watching this and all I got is a headache. You are definitely a life saver.
@AmulyaAnnapureddy
@AmulyaAnnapureddy 3 ай бұрын
Fell in love with your teaching❤ Great job ma'am🎉👏👏
@CricketHightlightz
@CricketHightlightz Жыл бұрын
Love You maam !Such a great and amazing explanation ...Search in google and watched a lot of the content in youtube too but not getting the actually point which i want and explain every pass and everything.......Such a great and superb maam
@luckyismynickname
@luckyismynickname 3 жыл бұрын
Best explanation i ever heard of this algo after searching soo many articles and wasting my 2 hours
@nhachanh5348
@nhachanh5348 3 жыл бұрын
amazing explanation! You took step by step and your lecture is much more understandable than my professor.
@taha5871
@taha5871 4 жыл бұрын
Really, The best explanation i found on KZbin until now, you are working hard to can explain by this very sample way. Thanks so much.
@deepakchaurasiya7508
@deepakchaurasiya7508 Ай бұрын
Still in the whole internet this type of shell sort explanation is not present. Thanks for this great video mam
@saraswatipujari4329
@saraswatipujari4329 Жыл бұрын
Thank you so much Madam. Excellent way of teaching 👍😍
@sharadpokhrel7746
@sharadpokhrel7746 Жыл бұрын
I am from Nepal ❤ your channel for my study materials. Best wishes.
@narendersinghraman4529
@narendersinghraman4529 4 жыл бұрын
Thank you so much! I have watched only this video of yours till now. But , i have to say, the explanation is brilliant!!!! Easily the best explanation of shell sort!🙏🙏
@joyontasaha4578
@joyontasaha4578 5 жыл бұрын
Women always excel in nurturing and teaching which is embedded in their DNA.
@123456agupta
@123456agupta 3 жыл бұрын
She did hard work to explain the complex concept in simple way
@ayushagarwal1584
@ayushagarwal1584 2 жыл бұрын
Happy to have a great teacher like you mam 🖤 Thanks 😊
@jindagi_ka_safar
@jindagi_ka_safar 3 жыл бұрын
Best video on shell sort in KZbin so far.
@gouravsinghrajput9548
@gouravsinghrajput9548 2 ай бұрын
Ma'am but insertion nahi selection sort ma sorted or unsorted portion hota hai
@shashwatpandey2793
@shashwatpandey2793 4 жыл бұрын
ONE GREAT VIDEO HELPS MILLIONS OF STUDENT ..... THANKS
@firdausareesha7259
@firdausareesha7259 2 жыл бұрын
Best teacher ever....coz of her Data structures ,DBMS is my fav ❤️
@princepandey6284
@princepandey6284 2 жыл бұрын
Explaination was very good but the code require little more improvement.
@jatinrathi9631
@jatinrathi9631 5 жыл бұрын
that explanation .... i totally got it. Hats off mam to ur explanation. That's the teaching skills need in india.🙌
@harishchandrajoshi4263
@harishchandrajoshi4263 5 жыл бұрын
bhai tuje pata hai is video me kya hua...bataiyo kuch
@jatinrathi9631
@jatinrathi9631 5 жыл бұрын
@@harishchandrajoshi4263 m b whi btaunga jo mam ne btaya..
@harishchandrajoshi4263
@harishchandrajoshi4263 5 жыл бұрын
@@jatinrathi9631 bada gyani hai yr tu
@jatinrathi9631
@jatinrathi9631 5 жыл бұрын
@@harishchandrajoshi4263 sunke manega ya aise hi?
@harishchandrajoshi4263
@harishchandrajoshi4263 5 жыл бұрын
@@jatinrathi9631 chup sale mam se sikayat kar dunga jada bolega tu
@prathmeshpawar5579
@prathmeshpawar5579 4 жыл бұрын
Dear Mam , Thank you for your level grate teaching. It is appropriate for us ! 👍
@jameskennedy674
@jameskennedy674 2 жыл бұрын
Is that how you spell great? "grate?
@suvashreepriyadarshinibisw8017
@suvashreepriyadarshinibisw8017 Жыл бұрын
What an explanation if no one getting any about dsa that person also clearly understood hopefully this channel getting more and more growth
@sdk1525
@sdk1525 3 жыл бұрын
I think the third for loop could've just been I = 0 and it increments by 1. ( same thing ). Great tutorials !
@Sakhtlaunda703
@Sakhtlaunda703 4 жыл бұрын
Mam your teaching skill and English pronunciation is OEWSOME. Impressed me a lot.
@atharv2189
@atharv2189 4 жыл бұрын
thank you ma'am you saved me from failing ^_^
@raman-jn6yt
@raman-jn6yt 4 жыл бұрын
Very good explanation... Learnt from you today !!! Thanks
@schris3587
@schris3587 4 жыл бұрын
Thank you so much for your patient instruction!!!
@hemantthakur5380
@hemantthakur5380 5 жыл бұрын
Mam there are questions like why we are doing this. wgy if no swapping is done there is no need of comparison with previous elements?
@shreechatane9215
@shreechatane9215 3 жыл бұрын
It takes great effort to write all the passes and operations on them thank you for taking those efforts for us ❤️
@krishnareddy4520
@krishnareddy4520 11 ай бұрын
A very good lecture I never see this type of lectures in KZbin
@fujelgaming9579
@fujelgaming9579 9 ай бұрын
what a easy and simple explainession
@rohitchilhorkar8114
@rohitchilhorkar8114 3 жыл бұрын
Thank you for such a wonderful explanation:) Whenever i start a new topic, the very first thing i do is check whether you have video on that topic or not.
@SatishKumar-vh3uu
@SatishKumar-vh3uu 4 жыл бұрын
Thnxxx mam a lot for clearing all my doubts
@gd7474
@gd7474 5 жыл бұрын
Mam,hats off to ur teaching..👏👏.i am ur suscriber,please put more videos😭😭 like,linked list,array implementation,doubly linked list in c++.........semaya teach panringa..pls..mam.....idhukulam..videos podunga😥
@Tiffanylizzmora
@Tiffanylizzmora 8 ай бұрын
this is great!!! thank you so much!
@MW_Futures
@MW_Futures 4 жыл бұрын
Tbh this explaination is so good damn.
@sriharshas3889
@sriharshas3889 5 жыл бұрын
your explanation was so good and can you make a video on backtracking problem like generating the binary strings, in general, the tree structure is represented but how it is going to work using recursion internal details can you explain ma'am?
@malarvizhigabriellajoy6588
@malarvizhigabriellajoy6588 2 жыл бұрын
Excellent mam
@zerosandones701
@zerosandones701 4 жыл бұрын
Love how positive the comments are!
@gabba1362
@gabba1362 2 жыл бұрын
Mam love ur explaining....by the way love u ❤️❤️
@abubakarsufian3287
@abubakarsufian3287 3 жыл бұрын
Believe me i have never seen a teacher explaining so good .Thku mam🖤❣️
@mustapharaimilawal8053
@mustapharaimilawal8053 4 жыл бұрын
Thank you for this video, your explanation is very clear and explicit.
@sreeramsreeram828
@sreeramsreeram828 2 жыл бұрын
Such a nice explanation with clear understanding concept,tq mam...💐
@tarjmsmnn
@tarjmsmnn 4 жыл бұрын
thank you mam for uploading...you explained it step by step...very easy to understand...👍
@amansinghrathore5361
@amansinghrathore5361 4 жыл бұрын
Superbly explained
@madhukiranattivilli2321
@madhukiranattivilli2321 2 жыл бұрын
In Shell Sort there are "gap" # of insertion sorts on "gap" # of sub-arrays, wherein the sub-array elements are at a distance of "gap" from each other. In the final iteration of shell sort, gap=1, and hence there wud be only 1 insertion sort, and on the entire array of size 'n'
@manishkumarsingh47
@manishkumarsingh47 4 жыл бұрын
excellent explanation
@shashikantpandit663
@shashikantpandit663 4 жыл бұрын
really a gr8 explanation ever saw, like u r explaining to kids. thanks a lot.
@patricechaula3430
@patricechaula3430 4 жыл бұрын
Your lectures are well explained, they are helping a lot.
@nimsarafernando8084
@nimsarafernando8084 3 жыл бұрын
Thank you so much, really appreciate your teaching.
@raktimbora880
@raktimbora880 5 жыл бұрын
something new i learn today
@nickbaib1839
@nickbaib1839 5 жыл бұрын
Good job! Thanks for the videos! I learn a lot of things from you! Continue the good job! Greetings from Greece!
@BetterVersionHust
@BetterVersionHust Жыл бұрын
The tracing was brilliant miss tq
@BalaganiVenkatamadhu
@BalaganiVenkatamadhu 5 ай бұрын
Thanks so much ma'am you explain very nice
@dipesheditz8103
@dipesheditz8103 Жыл бұрын
mam i am in love with your teaching
@faizyspace3227
@faizyspace3227 2 жыл бұрын
Appreciate your efforts , i understood very well, thank you so much .
@hunterzolomon6842
@hunterzolomon6842 3 жыл бұрын
Absolutely perfect, loved the explanation , other websites and people have skipped the redundant parts and many things which causes confusion , you explained every little step , thanks
@ShrewdRam
@ShrewdRam 4 жыл бұрын
Such a wonderful teaching I have ever seen😍✌️ concepts are very clear
@santhipriyapriya9828
@santhipriyapriya9828 3 жыл бұрын
Thank you Madam. You are Great teacher.
@bisritesh
@bisritesh 2 жыл бұрын
really very good, simple, explanation. :-) your videos are as lovely as you are.
@bharathys3533
@bharathys3533 3 жыл бұрын
mam you are great teacher kindly teach microprocessor and microcontroller
@mohammadjunaid8093
@mohammadjunaid8093 3 жыл бұрын
I don't have words for appreciation.
@SachinSingh-zw1um
@SachinSingh-zw1um 4 жыл бұрын
maam Outstanding Explanation
@kkookies6932
@kkookies6932 Жыл бұрын
i was wondering if there are more element in array then do I have to further divide n with 6 or 8 to find the gap
@manmanual
@manmanual 3 жыл бұрын
Thank you ma'am Kal se smjh Ni ara tha, apne acha explain Kia h👍
7.6 Quick Sort in Data Structure | Sorting Algorithm | DSA Full Course
24:43
Jenny's Lectures CS IT
Рет қаралды 2,6 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 1,3 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 77 МЛН
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 100 МЛН
How to: Work at Google - Example Coding/Engineering Interview
24:02
Life at Google
Рет қаралды 7 МЛН
Quick Sort For Beginners | Strivers A2Z DSA Course
35:17
take U forward
Рет қаралды 398 М.
7.4 Insertion Sort Algorithm |Explanation with C Program| Data Structure Tutorials
28:13
2.8.1  QuickSort Algorithm
13:43
Abdul Bari
Рет қаралды 3,2 МЛН
2.6.3 Heap - Heap Sort - Heapify - Priority Queues
51:08
Abdul Bari
Рет қаралды 2,1 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 1,3 МЛН