Recursion - Pattern Questions + Bubble Sort + Selection Sort

  Рет қаралды 198,060

Kunal Kushwaha

Kunal Kushwaha

Күн бұрын

Пікірлер: 270
@KunalKushwaha
@KunalKushwaha 6 ай бұрын
DSA + interview preparation playlist: kzbin.info/aero/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
@WORK-HARD-jm4cg
@WORK-HARD-jm4cg 5 ай бұрын
bro graphs and dp please
@karthikb975
@karthikb975 4 ай бұрын
In one word your explanation and teaching and the content your providing is better than the paid courses. Thank you kunal sir your dsa course helping us a lot to learn the dsa in easy way. And also we are waiting for the course on DP and Graphs that no-one has created so far !!! so plese make that concepts also
@saisivananduri819
@saisivananduri819 Ай бұрын
bro when will you complete the dsa course you say in every video we will do dynamic programming but you discontinues the course
@Tomharry910
@Tomharry910 2 жыл бұрын
Recursion is the part where even the most intelligent of folks struggle and give up programming. In India, I have personally seen intelligent people reluctant to share their knowledge out of hyper competetiveness. You don't know how many lives you're building by generously sharing this top level knowledge free of cost. God will always bless you for this selfless noble act, Kunal Sir 🙏
@mysteryman2213
@mysteryman2213 Жыл бұрын
good words and nice name though
@aakashbhandari9761
@aakashbhandari9761 Жыл бұрын
​@@mysteryman2213 😂
@plutomessi21
@plutomessi21 Жыл бұрын
@@mysteryman2213 🤣
@albin6126
@albin6126 Жыл бұрын
i noticed because you said legend @@mysteryman2213
@शुभम-सेमवाल
@शुभम-सेमवाल Жыл бұрын
hahahha
@realism2463
@realism2463 5 ай бұрын
Dp bro please , u r the best teacher i got so far , and struggling in dp the most , want to study from you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@nikolas8203
@nikolas8203 2 жыл бұрын
Gotta appreciate how you linked the pattern thing to bubble sort and selection sort...at first I was confused about it but then in a moment I was like "woah got it". Top-notch playlist
@ronitsharma0352
@ronitsharma0352 10 ай бұрын
Have to say one has to put everything to create a course like this !!! Thanks for the awesome and intuitive course but kunal bhai please complete this playlist. We really need videos on the rest of the topics!!!!!!!
@MozhdehNourizadeh
@MozhdehNourizadeh Жыл бұрын
Kunal, I cannot express my gratitude enough. Your teaching has been exceptional and transformative for me. I have finally grasped the concept of recursion - something that eluded me until now. You are an incredible teacher and mentor. PLEASE PLEASE PLEASE teach us more subjects like Hashmap and Dynamic programming. I am eagerly looking forward to taking those courses as well. 🙏
@prasadm3614
@prasadm3614 2 жыл бұрын
Yes, as you mentioned we r waiting for that course on DP that no-one has created so far !!!
@KrishNamaste
@KrishNamaste 2 жыл бұрын
Same here!
@shantohossain1372
@shantohossain1372 2 жыл бұрын
same here but it's more than one and half year gone!!
@udaysingh2929
@udaysingh2929 Жыл бұрын
still waiting
@prtk2verma
@prtk2verma 6 ай бұрын
@@udaysingh2929 khada hu aaj bhi wohi....
@veeee5577
@veeee5577 5 ай бұрын
still waiting
@saurabhjaswal21
@saurabhjaswal21 2 жыл бұрын
This playlist helps me a lot, thanks man for providing such a brilliant course
@TheDailyWordChannel
@TheDailyWordChannel Ай бұрын
Trust me when you add dp and graphs then all subscribes are view those videos and you cant even know how they appreciate you then every day you feel so proud by those words
@Sant-8988
@Sant-8988 18 күн бұрын
The thing is he has no time now for teaching.
@senseiAree
@senseiAree Жыл бұрын
I'm not a Java Programmer but Getting inspired by you, I have created a new Hackerank Account and started solving the problem solving questions again but this time I am using Recursion only. I have had six stars in problem solving before but I always struggled on Recursion. Thanks a lot Kunal Sir. You gave me inspiration. My core weakness was permutation and combination... Today after watching your algorithm on Recursion: Subset... I implemented the code in C# and I started jumping out of enthusiasm when it ran successfully.. I also implemented dynamic programming to it so it doesn't repeat on the same characters in the string. I can't elaborate with words how thankful I am.
@mrwhosetheboss6876
@mrwhosetheboss6876 3 жыл бұрын
kunal beside programming your are really a good teacher like u started with patterns thats simillar to two sorting technique its amazing and really helpfull thanks
@preetidas9155
@preetidas9155 5 ай бұрын
the best recursion playlist on KZbin🙌
@learnandtravel7722
@learnandtravel7722 Жыл бұрын
so here i completed more than half of the videos of this dsa playlist, day by day dsa is looking easy thanks to kunal for this amazing playlist and waiting for you to complete this playlist
@devjoshi7062
@devjoshi7062 3 жыл бұрын
really liked how you changed the intuition of pattern algorithm to make us understand the recursions for both the sorts, kinda makes people get up from all the boring tutorial vibe, haha loved it
@khushipurohit8761
@khushipurohit8761 8 ай бұрын
that was really cool
@vedanta007
@vedanta007 3 жыл бұрын
Kunal bro on fire 2 videos within 24hrs 🔥🔥
@sidhantgupta64
@sidhantgupta64 Жыл бұрын
I watch many videos for recursion but your one is the best because the way of teaching is good
@aryangupta6335
@aryangupta6335 7 ай бұрын
Must say it is the best playlist for recursion over the internet so far ...
@stranger_0911
@stranger_0911 7 ай бұрын
your explaination is so clear i was able to solve the bubblesort and selection sort problem with recursion without looking your solution first. Thanks a lot brother you're really awesome
@AdityaSingh-nz2if
@AdityaSingh-nz2if 8 ай бұрын
MindBlowing , u just connected a simple pattern question to BubbleSort , gave JEE feel when my teachers used to connect Advance problems to a simple concept. I am eagerly waiting for the DP series.
@jamespeterson7824
@jamespeterson7824 2 жыл бұрын
Good thought process by making that pattern question relatable to BubbleSort and SelectionSort.. Good knowledge is being grasped from you day by day 🙂
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
You're most welcome
@santhosh7042
@santhosh7042 2 жыл бұрын
Can you helpme out find what's wrong with this selection code after debugging i get to know that the zero index value is swapping with it's next value when the before pass is sorted let me explained what i saw on debugging is arr= 4 , 3 , 2 ,1 where s = 0; e = arr.length-1 when s = 0 (index) e = 2(index) arr is sorted i got the desired answer but when s = 0 and e = 1 it again get maximum value as 1 and rather than swapping with it self it is swapping with next index value and resulting in 2 , 1 , 3 , 4 static void selection_sort(int[] arr) { helper(arr,0,arr.length-1,Integer.MIN_VALUE,-1); } static void helper(int[] arr, int s, int e,int max,int max_index) { if(e==0) { return; } if(s
@aeroabrar_31
@aeroabrar_31 2 жыл бұрын
@@KunalKushwaha Please continue this Bootcamp !!😪😭
@akashstark1836
@akashstark1836 Жыл бұрын
​@@santhosh7042in if condition you have to give like s
@KshitizAnand-xr1wj
@KshitizAnand-xr1wj 5 ай бұрын
Thank you so much Kunal for teaching us the recursive way of bubble sort and selection sort, that was so amazing.
@ridoychandradey8337
@ridoychandradey8337 2 жыл бұрын
Recursion guru Kunal Kushwaha. Eagerly waiting for dynamic programming series.
@abirgupta2711
@abirgupta2711 3 жыл бұрын
Hey Kunal, can you share a tentative timeline for this bootcamp? That will be very helpful. Anyways the videos are super awesome !!
@malishagavali9225
@malishagavali9225 7 ай бұрын
Oh gosh, I was banging my head against the wall! I really thought we were going to print the pattern using bubble sort. Now I understand that we're solving bubble sort using recursion, haha
@keshavdeosharma7222
@keshavdeosharma7222 Жыл бұрын
Thanks Kunal Bhaiya for sharing the knowldege.
@Helly_Patel
@Helly_Patel 3 жыл бұрын
Thanks for teaching us like no one did till now!! One small request, please make lectures on dynamic programming as well!!
@deepanshu5394
@deepanshu5394 Жыл бұрын
++
@rajeevkandpal1880
@rajeevkandpal1880 2 жыл бұрын
Hey @Kunal, thanks for all the awesome content you are providing for free. This is pure GOLD i must say. Can you point me to some of DP videos you have, I am not able to find anything on DP on your channel?
@burhanuddinraja7209
@burhanuddinraja7209 2 жыл бұрын
Kunal a humble request to please start the topics like Dynamic programming, hashing and stuff. It will be very helpful. Your explanations are good that's why.
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
I will
@burhanuddinraja7209
@burhanuddinraja7209 2 жыл бұрын
@@KunalKushwaha Thank you for this course
@DeepeshKumarSingh-ey5vl
@DeepeshKumarSingh-ey5vl 5 ай бұрын
@@KunalKushwaha But when????????
@MegaArvind111
@MegaArvind111 3 жыл бұрын
Time for a job change... This is best playlists to work thru...
@abhinavrai5762
@abhinavrai5762 4 ай бұрын
Kunal Sir please complete this video playlist we really need you out here...
@MuhammadAzeem-bd7xf
@MuhammadAzeem-bd7xf 20 күн бұрын
I guess I'm getting decent at recursion man. Thanks Kunal with Love from Pakistan
@shadowmonarch1432
@shadowmonarch1432 2 жыл бұрын
After getting a feel of recursions,I'm able to solve all of them before the video🥲 thanks Kunal🙂
@fitnessandscience1575
@fitnessandscience1575 3 жыл бұрын
Thanks for sharing ur beautiful knowledge kunal bro ❤️❤️❤️
@aman_mandal
@aman_mandal 3 жыл бұрын
Although...am lil far from this lecture...but thankyouu for the consistency sir❤️✨
@shraddhaverma6434
@shraddhaverma6434 3 жыл бұрын
Thanks for the amazing content kunal 🔥 kudos!
@KhushiSingh-ft8dk
@KhushiSingh-ft8dk 8 ай бұрын
This playlist helps me a lot, thanks sir for providing such an amazing course..😇
@akshaygill4483
@akshaygill4483 Жыл бұрын
Man you taught me how to debug a code , and it is very usefull while doing recursion questions thanku so much
@Hello_Beasty
@Hello_Beasty 3 жыл бұрын
Bro make a video on how a new coder start it's journey and when we do internship
@dipalitusharvlogs7252
@dipalitusharvlogs7252 Жыл бұрын
As always, simplified and awesome explanation💚
@reshihashim4094
@reshihashim4094 3 жыл бұрын
u make things easier and simpler to understand .... thank u so much for this Recursion playlist 🔥🔥🔥... Learnt a lot from you, like how to approach a problem and different ways of solving a particular problem and so on... keep it up brother 🙂🙂🙂 Love from Kashmir ❤️
@KunalKushwaha
@KunalKushwaha 3 жыл бұрын
You are most welcome
@mathis-meth4229
@mathis-meth4229 2 жыл бұрын
Kunal is the OG of DSA teaching
@Aspirantonmission25
@Aspirantonmission25 5 ай бұрын
Sir,you made my life so easy ❤❤❤
@srinivasanshankaranarayana3093
@srinivasanshankaranarayana3093 3 жыл бұрын
Awesome content 👏👌
@devendrasolunke4619
@devendrasolunke4619 3 жыл бұрын
Bro you bring back my confidence and intrest in programming..❤️
@KrishNamaste
@KrishNamaste 2 жыл бұрын
Man, please continue this if it is possible.
@parul8334
@parul8334 Жыл бұрын
Today I have done all easy question from the assignment and tomorrow I will try the medium one
@hello_kitty1234-r9l
@hello_kitty1234-r9l 5 ай бұрын
kunal be like : no i m not gonna explain it again and after 5 mins he is literally explaining same thing just to make us understand , hats off to him man
@nayanmu
@nayanmu 2 жыл бұрын
Awesome bro..when will you teach us dynamic programming?
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Yes but later
@mahajveemahajvee8941
@mahajveemahajvee8941 2 жыл бұрын
@@KunalKushwaha ok 🙂🙂🙂🙂
@ziadotenv
@ziadotenv 10 ай бұрын
​@@KunalKushwaha dp 😢
@pawanyadav4024
@pawanyadav4024 2 ай бұрын
thank you so much for simplifying the selection sort
@kritikjain3617
@kritikjain3617 3 жыл бұрын
What an explanation man!
@KovidhVSBhati
@KovidhVSBhati 9 ай бұрын
i think for first if(c < r) it should be if(c
@450Santoshmaharana
@450Santoshmaharana 5 ай бұрын
@KovidhVSBhati I believe, in last else condition (when c==r), swap when last element in array is less then max
@ShaikAtif-kg5qm
@ShaikAtif-kg5qm 4 ай бұрын
bro, column value starts from 0, so let say for example r=4, then c will be from 0 to 3. from 0 to 3 four checks are done so no need of c
@atulpanda6051
@atulpanda6051 3 жыл бұрын
Thanks for this Recursion video
@cindrasenareddy1929
@cindrasenareddy1929 2 жыл бұрын
asusual kunal rocks!!!!!!!!!!
@amaanullah13
@amaanullah13 2 жыл бұрын
Bro put space after "as" I've read it asexual Kunal rocks🤣
@Adonis08
@Adonis08 Жыл бұрын
Selection Sort Without Max Variable!! static void selection(int[] arr, int r, int c) { if(r==0) return; if(r>c) { if(arr[c]>arr[r]) { int t=arr[c]; arr[c]=arr[r]; arr[r]=t; } selection(arr,r,c+1); } else{ selection(arr,r-1,0); } }
@litheshshetty7839
@litheshshetty7839 2 жыл бұрын
7:23 eagerly waiting for it bhai!!!
@Furious_footballs
@Furious_footballs 5 ай бұрын
short code for triangle 1 static void pattern(int row , int col) { if(row==col) { System.out.println(); pattern(row-1,0); } if(row>col) { System.out.print("* "); pattern(row,col+1); }
@foyzanahmed4091
@foyzanahmed4091 Жыл бұрын
brother, Please start DP series. You are magician.
@Aniket_0314
@Aniket_0314 Жыл бұрын
woooooo hoooooooooooooooooooo great video ✨😊
@agamverma8480
@agamverma8480 Ай бұрын
Bhaiyaaa please bring the DP series. Eagerly waiting for it.
@dinbandhusharma4568
@dinbandhusharma4568 Жыл бұрын
thanks for this amazing video 🤗👍🏻🔥❤‍🔥
@kishanmadlani1391
@kishanmadlani1391 Жыл бұрын
10:00 this is also a one method for print the stars method static void triangle(int r ,int c){ if (c 0) { System.out.print("* "); printStars(n - 1); } }
@akshayjha8369
@akshayjha8369 Жыл бұрын
pls upload dp and graph videos asap
@sudhanshukushwaha6351
@sudhanshukushwaha6351 2 жыл бұрын
In every classroom there are such students who ask like this 😁😁
@nikitajaiswal9112
@nikitajaiswal9112 3 жыл бұрын
Q. 1 solution Def triangle(n) : If n==0: return Print("* "*n) triangle (n-1)
@yogeshkumarpandey2343
@yogeshkumarpandey2343 3 жыл бұрын
*This is my C++ Code. The course is Fantastic.* void buble(int *arr,int n,int end,int itr) { if(end==0) { return; } if(arr[itr]>arr[itr+1]&&itr
@kanyapandey
@kanyapandey Жыл бұрын
Thank you my Guru 👏👏👏👏
@keshav-ip7vx
@keshav-ip7vx 2 жыл бұрын
in the first program, the stack size is the total number of (*) or O(row^2) so we should return until we start printing the next row for good programming practice.
@kvcricketech
@kvcricketech 5 ай бұрын
Dynamic programming playlist please
@PurnaPlayss
@PurnaPlayss 2 күн бұрын
Thank you 👍
@akashstark1836
@akashstark1836 Жыл бұрын
For selection sort we can start column value from 1 since we assign max as 0 in initial all the time , we don't have to check 0 th position with 0th
@priyanshuvettori5179
@priyanshuvettori5179 2 жыл бұрын
wow this is wonderful really.
@amandixit8342
@amandixit8342 3 жыл бұрын
Wow , recursion ki ek aur video 😁😁
@KunalKushwaha
@KunalKushwaha 3 жыл бұрын
7 aur ayengi abhi
@Dekh_rha_hai_vinod.
@Dekh_rha_hai_vinod. 3 жыл бұрын
@@KunalKushwaha omg😌😌😀
@anandrengu5806
@anandrengu5806 11 ай бұрын
Hi Kunal, Nice playlist ,it is helping me a lot ,I have a doubt like in triangle2 ,I think so you missed to mention that function call like (3,3) ,(2,2) ,(1,1) will also happen .Anyways thanks man for your amazing playlist.
@khushaldodeja8267
@khushaldodeja8267 9 ай бұрын
Thanks.
@kartik7239
@kartik7239 10 ай бұрын
I was hoping you finish this playlist.
@spdwivedi5925
@spdwivedi5925 6 ай бұрын
Great video
@mohakhiphop
@mohakhiphop 2 жыл бұрын
At this stage I'm able to solve given problems before i see your solution 🙌 hats off and huge thanks to you for helping me in developing the approach ❤️💯
@mudittiwari8615
@mudittiwari8615 Жыл бұрын
I love this course
@positive-e9m
@positive-e9m 5 күн бұрын
kunal....please please upload the Dynammic programming , and remaing stuffs in DSA
@varunsen2802
@varunsen2802 3 жыл бұрын
Thank You so much brother!
@Luffy_2804
@Luffy_2804 Жыл бұрын
after hint : static void printPattern(int row , int col , int n){ if(row==0) return; if(col
@arbindsharma1423
@arbindsharma1423 2 жыл бұрын
bhai, I can't see dynamic problems video? Can you please upload one .. and bdw loved your content.
@anchit1237
@anchit1237 3 жыл бұрын
Kunal, Can I learn C++ and Java together? I know it's difficult but would there be a bigger problem in the future?
@prakhar266
@prakhar266 3 жыл бұрын
Learn either java or c++ thoroughly first .other language will take max 15 days for completion
@rashidansari4176
@rashidansari4176 3 жыл бұрын
@@prakhar266 Completely agree with with you bro, learn anyone first. then switching is to another is quite easy.
@mohammedsuhail8706
@mohammedsuhail8706 3 жыл бұрын
Syntax will screw u If u try to learn it together
@amansayer4943
@amansayer4943 Жыл бұрын
@@mohammedsuhail8706 bhai wahi hogaya mere sath .
@Aakashhoney278
@Aakashhoney278 Жыл бұрын
please complete the course sir
@akhilyadav7540
@akhilyadav7540 2 жыл бұрын
Kunal please make a video on dynamic programming and grap also 🙏🙏❤
@akhilyadav7540
@akhilyadav7540 2 жыл бұрын
Graph*
@rahuldev6206
@rahuldev6206 3 жыл бұрын
nice content we love your efforts can you suggest me any course of android development❤❤
@anush_20
@anush_20 Жыл бұрын
6:50 bro when u gonna do dynamic programming
@ihsannuruliman3656
@ihsannuruliman3656 2 жыл бұрын
Great coding, probably a little bit improvement to the recursive bubble sort algorithm. We don't need to check further if no swap happened in a row. Here, i is column and end is row. static boolean swapped = false; public static void sort(int[] arr, int i, int end) { if(end < 1) return; if(i < end) { if(arr[i] > arr[i+1]) { // swapping int temp = arr[i+1]; arr[i+1] = arr[i]; arr[i] = temp; swapped = true; } sort(arr, ++i, end); } else { if(!swapped) return; swapped = false; sort(arr, 0, --end); } }
@harish-fw6cw
@harish-fw6cw Ай бұрын
Thank you bro
@virat7800
@virat7800 3 жыл бұрын
awesome😍😍😍😍
@itshari5489
@itshari5489 Жыл бұрын
32:05 We are considering index value not the exact value. arr[max] = 4 & arr[c] = 4 By mistake kunal says 4 greater than max value. Instead its equal so no updation in max index postion.
@AishwaryaSinha-t4o
@AishwaryaSinha-t4o 2 ай бұрын
i think def triangle(n): if n==0: return else: print(n*'*') return triangle(n-1) is more concise and easy
@allaboutgamimg7976
@allaboutgamimg7976 3 жыл бұрын
Awesome 🔥
@pikayaan
@pikayaan 3 ай бұрын
the 1st triangle can be solved using only one variable with the help of a helper function:-- static void pureRecur(int i) { if (i == 0) return; printrow(i); pureRecur(--i); } static void printrow(int n) { if (n == 0) { System.out.println(); return; } System.out.print("*"); printrow(--n); } public static void main(String[] args) { pureRecur(10); }
@surya.6907
@surya.6907 19 күн бұрын
you are doing same man,just making another method doesnot change the fact that you took two parameters (n and i) in those methods.
@vaishnaviummaji321
@vaishnaviummaji321 Жыл бұрын
@KunalKushwaha when will you start dynamic programming series?
@feliksbekeshov7668
@feliksbekeshov7668 2 жыл бұрын
Kunal when we will have Trees and Graphs here in this DSA playlist??????
@shubhanshukushwaha6150
@shubhanshukushwaha6150 Жыл бұрын
bubble sort gives stackoverflow at line no. 53 in your code , kindly take example as 4872.
@garvitmathodia8268
@garvitmathodia8268 Жыл бұрын
bro please make a series on DP
@naruhitoabiku9451
@naruhitoabiku9451 Жыл бұрын
you are a legend
@rudram4534
@rudram4534 2 жыл бұрын
still watching consistently 😀😀😀
@sravanakirtana2787
@sravanakirtana2787 10 ай бұрын
Nice Video
Merge Sort Using Recursion (Theory + Complexity + Code)
49:47
Kunal Kushwaha
Рет қаралды 265 М.
Recursion - Permutations (Theory + Code + Tips)
25:22
Kunal Kushwaha
Рет қаралды 177 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
LazyGit: Effortless Git in Your Terminal!
7:19
CodeOps HQ
Рет қаралды 2,2 М.
Strings and StringBuilder in Java
1:27:29
Kunal Kushwaha
Рет қаралды 549 М.
How to Start LeetCode from ZERO in 2025
11:31
Ashish Pratap Singh
Рет қаралды 153 М.
How to Stop Procrastinating and Finally Take Action
16:31
Ali Abdaal
Рет қаралды 144 М.
Recursion - Array Questions (Theory + Code + Tips)
1:18:48
Kunal Kushwaha
Рет қаралды 356 М.
these are the habits of the top 1% students, that you can do.
12:58
Introduction to Recursion - Learn In The Best Way
1:55:49
Kunal Kushwaha
Рет қаралды 1 МЛН
Insertion Sort Algorithm - Theory + Code
30:40
Kunal Kushwaha
Рет қаралды 265 М.
Recursion Subset, Subsequence, String Questions
1:23:56
Kunal Kushwaha
Рет қаралды 355 М.