N-Queens, N-Knights, Sudoku Solver (LeetCode) - Backtracking Questions

  Рет қаралды 156,969

Kunal Kushwaha

Kunal Kushwaha

Күн бұрын

Пікірлер: 239
@KunalKushwaha
@KunalKushwaha 2 ай бұрын
DSA + interview preparation playlist: kzbin.info/aero/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
@GuruPruthviJM
@GuruPruthviJM 2 ай бұрын
Hey, Kunal, Actually, your DSA playlist is awesome and I have learnt the recursion and tree basic concepts from you thoroughly thank you. Can you please make the videos on Graphs and DP.
@akashvarma4325
@akashvarma4325 2 жыл бұрын
In the isSafe method in the If condition you have written "board[row][col] == num" which is only checking that element for 9 times instead of checking all the forward elements, it is not giving error but the sudoku is not properly solved, instead there should be "board[row][i] = num" which will check other elements in the row as well and then the sudoku will be solved properly.
@mukeshkumarv5677
@mukeshkumarv5677 2 жыл бұрын
Yeah I also noticed that 😅...
@arpityadav2268
@arpityadav2268 2 жыл бұрын
Yeah, you are right, bro!
@aakashyadav9117
@aakashyadav9117 Жыл бұрын
You are right i was not able to solve sudoku and this took me 1 hour to find this issue . thanx bro
@gojosatoru988
@gojosatoru988 Жыл бұрын
I saw that too, like in the first row 6 & 2 are getting repeated, and same issue with other rows
@suhaspatil8682
@suhaspatil8682 2 жыл бұрын
Wow . The best Recursion playlist ever made (according to me) . As you said I have drawn Recursive tree for each and every problem. Yes it was time consuming and it was really tough in the beginning but later on I started enjoying it. So I will suggest whoever thinking to follow this DSA playlist can follow it blindly.
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Wow, thank you!
@rahuls8613
@rahuls8613 2 жыл бұрын
I am a beginner in coding can I watch it for good jobs? I think it is in Java.
@shyamraj3605
@shyamraj3605 2 жыл бұрын
@@rahuls8613 yes
@Tomharry910
@Tomharry910 Жыл бұрын
I have now watched all the 11 videos in your recursion series playlist. I am now able to understand how recursion functions - how the recursion calls go onto the stack and how it comes out. I feel more confident with recursion which I used to dread earlier and was a nightmare for me. I now feel happier when I learn to code. Your videos has helped hundreds of thousands of struggling students like me and in the coming time hopefully will help millions of students learning to code around the world. Thank you for sharing your knowledge and wisdom so generously and freely with us without even charging a penny. Hope the seeds of learning that you have sowed in our lives, abounds and brings much happiness and success in your life as well. Wishing you the very best life has to offer. Thank you so much, Sensei 🙏💐💐
@KunalKushwaha
@KunalKushwaha Жыл бұрын
You’re welcome
@shanmugamnp4615
@shanmugamnp4615 Жыл бұрын
@@KunalKushwaha Hey Kunal, We need the content of Dynamic Programming, Tree and Graph algorithms from you. Please do it as soon as possible.
@ChiranjeeviGaming2003
@ChiranjeeviGaming2003 14 күн бұрын
Thank god i have started learning recurr from kunal not anywhere else , topics are clear now and not seems that much hard my friends used to told me 🥲🥰
@Anic10
@Anic10 2 жыл бұрын
Kunal, your series helped me with motivation. I got selected in Morgan Stanley as QA. Thanks brother. 😊
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
That's amazing, congratulations and thank you!
@Anic10
@Anic10 2 жыл бұрын
Hi Kunal, first of all a very big thank you. I have started watching your KZbin videos of Data structures #DSAwithKunal. I am an experienced guy with 4 years of Automation Testing experience. I started leetcode when you solved that recursion problem. Your Strings video helped me with clearing concepts. Every QUALITY ASSURANCE guy/girl must also watch this series. #Dsforall Currently completing Recursion series. Thanks man. A big thank you 🙏
@tafiquehossainkhan3740
@tafiquehossainkhan3740 2 жыл бұрын
Bro when will we get all the video..
@pythonenthusiast9292
@pythonenthusiast9292 2 жыл бұрын
@@Anic10 but bro how is DSA helping in field of QA ?
@Anic10
@Anic10 2 жыл бұрын
@@pythonenthusiast9292 Yes bro.. Big tech companies like Arcesium, Browserstack have coding rounds prior to interviews. In interviews they ask easy to medium problems on linked list,stacks ,queue and time complexities. So to become SDET DSA is necessary.
@mbilal11097
@mbilal11097 2 жыл бұрын
We can't thank this guy enough. Such an amazing course so far.
@jnayehsirine6222
@jnayehsirine6222 Жыл бұрын
its been more than 3 months since i completed the serie and i still rwatch again , thank youuuu !!!!!
@piyushgupta6290
@piyushgupta6290 2 жыл бұрын
Don't know how people can dislike this kind of content. This is the finest and most premium course I have found not only youtube even the paid contents. And this DSA course is not just a course its like we are feeling the DSA. Making my imagination strong and new thought process starts growing. THANK. YOU KUNAL BHAI YOU ARE LIT!!
@shivamtyagi2668
@shivamtyagi2668 2 жыл бұрын
it took me 2 days ,but i didn't give up, I SOLVED it, Revised everything I was struggling with
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
awesome
@shafinnahian75
@shafinnahian75 Жыл бұрын
Kudos to you, man. I genuinely found a mentor I can follow. I can certainly see light on the other end of the road, and you're helping me to walk each step - carefully guiding me through every obstacle upfront. Thank you, Kunal. I sincerely mean it. Just completed the Recursion playlist ( July 10th, 2023 ). Going to complete a few "Assignments" from your GitHub repo and dive deep into the DSA playlist afterwards. I'll keep you updated with that playlist too xD Thanks again, man. If I could, I would've given you the warmest hug (with a box of biriyani of course XD )
@snehashishghosh6914
@snehashishghosh6914 2 жыл бұрын
The way you broke down the ideas and made them so simple to understand and apply is "very next level" :)
@animeshsingh3748
@animeshsingh3748 2 жыл бұрын
This is literally the best recursion playlist I ever laid my eyes on. You made sure to cover all the doubts that could arise in one's mind. Your explanations were just amazing and you made these problems look so simple. Thanks for all your hard work and dedication. 😊
@nikhilchauhan3506
@nikhilchauhan3506 Жыл бұрын
hi bro can you help me
@hargunsingh8800
@hargunsingh8800 Жыл бұрын
Hi Kunal, Your recursion playlist on KZbin has been a game-changer for me! I have learned so much and have been able to apply the concepts in my coding projects. I would love to see a new lecture series on dynamic programming. I know it's a challenging topic, but I trust your teaching style and explanations to make it more approachable. Keep up the great work!
@aswinvignesh3985
@aswinvignesh3985 Жыл бұрын
@KunalKushwaha +1 mistake, which no one spotted for suprise. In nKnights , the loop goes on stops at the last row and last col of matrix , instead of running through it . Your code - row
@aswinvignesh3985
@aswinvignesh3985 Жыл бұрын
For 3 x 3 there should be 36 ans instead we have 25 ans since last box is missed in output. Check output there will be no knight in last box in any of those ans
@kavyaN2004
@kavyaN2004 Ай бұрын
Kunal.... Please start uploading videos for dynamic programming...! Please.. I have been trying for so long to learn DP but couldn't able to solve the problems. So please start teaching dynamic programming.🥺🥺🥺
@anujraj1000
@anujraj1000 4 ай бұрын
Just minor correction, while checking the row for the number instead of board[row][col]== num, just replace col with [i] . It will fix the duplication issue.
@hrithikshaw434
@hrithikshaw434 2 жыл бұрын
Once again best quality teaching as always. Thankyou Kunal ❤️
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Thanks for sharing! More to come!
@petersampodiras6590
@petersampodiras6590 2 жыл бұрын
This is by far the best playlist on youtube. Your teaching is truly amazing. Are you planning on making any videos explaining dynamic programming?
@poorpanda9033
@poorpanda9033 Жыл бұрын
Watching this video after completing the previous videos, Just makes it so easy to understand ! Thank you so much for teaching this for FREE!
@KunalKushwaha
@KunalKushwaha Жыл бұрын
Glad it was helpful!
@Rashmi-bs-09
@Rashmi-bs-09 9 ай бұрын
Yes, the best Recursion Playlist with progression to Backtracking concept so Far . Thanks Kunal, Keep up the good work .
@vudumulanagasairahul1298
@vudumulanagasairahul1298 10 ай бұрын
complete this playlist and dynamic programming as soon as possible brother you are worth for every student iam loving your content so much
@GuruPruthviJM
@GuruPruthviJM 2 ай бұрын
Hey, Kunal, Actually, your DSA playlist is awesome and I have learnt the recursion and tree basic concepts from you thoroughly thank you. Can you please make the videos on Graphs and DP.
@adbhuthareddy
@adbhuthareddy 2 жыл бұрын
Never tried to solve a sudoku in my entire life. Now just writing a program for sudoku to solve itself 😎.... Came a long way 😂 Thanks @Kunal Kushwaha
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Best of luck!
@adbhuthareddy
@adbhuthareddy 2 жыл бұрын
@@KunalKushwaha Thank you Bro !!!
@tharunkumar9208
@tharunkumar9208 2 ай бұрын
I always feared of recursion and data structures even after started this bootcamp..i gave up at recursion videos at first but later i thought of giving a shot and now im here and can say that i really loved learning recursion and the way you are teaching is awesome. Looking forward for more videos on this playlist.
@himanshusharma3301
@himanshusharma3301 2 жыл бұрын
I think that for the isValid function if the N- Knights there should be 4 more conditions which are : (r+2,c+1) ,(r+2,c-1),(r+1,c+2) &(r+1,c-2) .
@roshanmhatre8810
@roshanmhatre8810 2 жыл бұрын
Yeah, total 8 conditions are there.
@prasoonlall9432
@prasoonlall9432 2 жыл бұрын
We are moving gradually downwards from each row. So while checking, we need to make sure that the new location doesn't have any knights positioned above that row, as the below rows will be empty at that stage. Hence, he didn't include all 8 conditions. Even if he did add the remaining 4 conditions, they'll always return true as they would contain false at that stage.. Hope you got the concept.
@shubhamrawat3984
@shubhamrawat3984 2 жыл бұрын
If I am placing a knight at (r, c), where will the previous knight could be present? (keep in mind that we are travelling one row after another) Will the previously placed knights be present on the same row as ours and on the rows before it? OR Can a previously placed knight be found on the rows below our current (r, c)? If not, then do we really have to check for r+1 and r+2 rows?? THINK ABOUT IT.....
@ShiveshSumbly
@ShiveshSumbly Жыл бұрын
bro we only check for the above rows whle placing the knight because we are placing them from top to bottom
@aswinvignesh3985
@aswinvignesh3985 Жыл бұрын
Its like we both have eye contact, if i can see you then you can definitely see me . Same in knights we only check on top or above moves because there is no knights below . Both has same moves if they intercepted
@thankyou2494
@thankyou2494 2 жыл бұрын
I was feeling sleepy but This video is refreshing
@deepakchourasiya5957
@deepakchourasiya5957 2 жыл бұрын
Soon you will receive silver play button ✌😊
@Karan-vq5vg
@Karan-vq5vg 2 жыл бұрын
For SUDOKU Solver : Is the if condition under //row check correct? I think it should be if(board[row][i] == num) return false. What is your opinion Kunal?
@anandhisubramaniam6630
@anandhisubramaniam6630 2 жыл бұрын
I guess it is row, i, where it should remove duplicates.
@158.sahilsaxena8
@158.sahilsaxena8 2 жыл бұрын
That's exactly i am thinking about... @ 1:07:51 - there is no dependency of if condition on the loop... so how it check row's element..... it should be if ( board [row] [i] == num) and the output was also incorrect .... there were a repeating elements is the row....
@priyanshutiwari1151
@priyanshutiwari1151 2 жыл бұрын
Yes u r right karan....there should be board[row][i]
@Coding_GupShup
@Coding_GupShup 8 ай бұрын
Thanks a lot for solution, i just stuck there. And thought where was the actual problem. Thank u.
@amitbutola2291
@amitbutola2291 2 жыл бұрын
15:50 Simple way to find diagonal left and diagonal right // diagonal left int r = row; for(int c = col;c>=0&&r>=0;c--,r--){ if(board[r][c]){ return false; } } // diagonal right r = row; for(int c = col;c=0;c++,r--){ if(board[r][c]){ return false; } }
@abhinjr4918
@abhinjr4918 10 ай бұрын
i wrote the same thing in my rough before he explained other approach
@mohammedharoon1167
@mohammedharoon1167 Ай бұрын
I dont think anyone will hate recursion after completing this playlist. if they do it must be lack of practice. Lovable course for sure 😍😍😍
@medakremlakhdhar419
@medakremlakhdhar419 9 күн бұрын
Thank you man, FKING THANK YOU! never thought I’d be able to understand such topics.
@suheabkhan2546
@suheabkhan2546 2 жыл бұрын
The best I have ever seen... Felt happy from depths of my heart💖💖
@rishabhrawat8197
@rishabhrawat8197 2 жыл бұрын
thankyou you made coding so interesting its approx. one month following your dsa series i purchased some courses but i never got intuitions then i skipped coding now i am getting intuitions as well
@amansayer4943
@amansayer4943 Жыл бұрын
i dont know why i am not getting this backtracking questions .but still thank you kunal you created the base of recursion .
@sirishbhat
@sirishbhat 2 жыл бұрын
small error in checking if the number is in the row. The condition should be if(board[row][i] == num)
@dark_techyy
@dark_techyy 2 жыл бұрын
yes because of which 2 is getting repeated in the output..have u seen that?? 😅
@abhinavupadhyay9460
@abhinavupadhyay9460 2 жыл бұрын
Right!!
@aniruddhmishra6182
@aniruddhmishra6182 2 жыл бұрын
By far the best recursion playlist i've ever seen
@satishgajavilli7816
@satishgajavilli7816 2 жыл бұрын
Sir, understanding videos very very well but coming to assignment facing lot of difficulty
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
check leetcode video i made
@PradeepYadav-fg2yg
@PradeepYadav-fg2yg 2 жыл бұрын
never thought i could literally understand these concepts thankyou for teaching🙏🙏
@rajendiranvenkat5992
@rajendiranvenkat5992 9 ай бұрын
kunal, waiting for your sliding window concepts badly. Thank you so much for this playlist.
@Apna_Gamer-rz2jl
@Apna_Gamer-rz2jl 7 ай бұрын
how your sudoko code is correct bro. look at your answer in the very first row 2 is coming twice at 4 and 6 index
@sweetyprasad287
@sweetyprasad287 7 ай бұрын
Thank you so much for this amazing recursion series!
@the_ranjit_kumar_nayak
@the_ranjit_kumar_nayak 2 жыл бұрын
I just eagerly wait for your video kunal ❤️
@himanshudixit2848
@himanshudixit2848 2 жыл бұрын
Ki Kunal, There should be 8 - cases for N Knights Problem under "isValid" Method or I'm doing something wrong ?
@abirsikdar628
@abirsikdar628 2 жыл бұрын
we check for the previous rows only, so I guess 4 cases is all
@janakiram1187
@janakiram1187 2 жыл бұрын
Bro do some videos on Linkedlist,stacks
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
coming very soon after OOP
@janakiram1187
@janakiram1187 2 жыл бұрын
@@KunalKushwaha thanks bro 👍
@premsoni619
@premsoni619 7 ай бұрын
Is this a Java + DSA course or a Netflix series? 🤔 Honestly, it's been so captivating from start to finish with such thorough explanations. Thank you for making learning so enjoyable! Can't wait for more!
@VishalKumar-pk9ek
@VishalKumar-pk9ek 2 жыл бұрын
mind blowing....... ek ek line of code kya kar raha hai har question me , sab samajh aa gaya 😍😍😍😍
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
that was the plan
@aryanchiyaj7057
@aryanchiyaj7057 9 ай бұрын
Thank you soo much for this awesome content, bro ! I learned a lot from in these series !! please make series of dynamic programming
@anmolsharma9539
@anmolsharma9539 2 жыл бұрын
Excellent video kunal thanks for explaining in such great way . I think there is a small mistake in the N knight problem a knight can move in 8 different direction instead of four so I think 8 checks will be required . Thanks again for the awesome content.
@shubhamrawat3984
@shubhamrawat3984 2 жыл бұрын
If I am placing a knight at (r, c), where will the previous knight could be present? (keep in mind that we are travelling one row after another) Will the previously placed knights be present on the same row as ours and on the rows before it? OR Can a previously placed knight be found on the rows below our current (r, c)? If not, then do we really have to check for r+1 and r+2 rows?? THINK ABOUT IT.....
@niteshkushwaha9493
@niteshkushwaha9493 Жыл бұрын
​@@shubhamrawat3984 thanks for the explanation
@soomrokazim5822
@soomrokazim5822 Жыл бұрын
No brother your concern is legit, I also had same question but think about it deeply we are starting from first row to bottom and while doing down we have to only check for upwards as there's no any knight placed already in the end rows whereas in upper rows we placed and came down.
@milan_20
@milan_20 10 ай бұрын
36:35 Really i can assure the code kunal sir does...if you understand it then ... there's no shorter version you can find...
@kaushikdeka4529
@kaushikdeka4529 2 жыл бұрын
Thank you bhiya you are a gem
@saurabhrao7423
@saurabhrao7423 2 жыл бұрын
hey kunal , can we start doing the hard section in your git hub assignment ( after completing recursion series) ?
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Yes
@neeldiyora3575
@neeldiyora3575 Жыл бұрын
The answer of sudoku solver that you're getting is wrong.
@code2287
@code2287 Жыл бұрын
There's a mistake in the soduku isSafe problem it doesn't check all columns in particular row Should be board[row][I] == number You wrote board[row][col] == number Which just checks the same thing and iterates over... check the first row of answer it has 2 twice second row two has duplicates along the row
@KunalKushwaha
@KunalKushwaha Жыл бұрын
yeah that's a typo I made while live coding but self explanatory
@code2287
@code2287 Жыл бұрын
@@KunalKushwaha Sure, must be stressful going long hours....Thanks for the playlist anyway really beneficial
@dhanushramnagarajan2635
@dhanushramnagarajan2635 2 жыл бұрын
Hi kunnal, I watched all videos in recursion is too good. I like your way of approaching the problem. In this video "Sudo solver" output is "incorrect". Because of minor mistake in "isSafe method -> Checking the row".
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
It's correct I just did a typo with variable in hurry which is mentioned in timestamps
@dhanushramnagarajan2635
@dhanushramnagarajan2635 2 жыл бұрын
@@KunalKushwaha Yes noticed 👍
@UvUtkarsh
@UvUtkarsh 2 жыл бұрын
great video bhai, but at 1:16:52 the sudoku was not solved correctly. Edit : Solved vertically but not horizantally, what a coincidence
@tushargupta6533
@tushargupta6533 2 жыл бұрын
🥲
@serveshchaturvedi2034
@serveshchaturvedi2034 2 жыл бұрын
Great eye man. I think the first check should be board(row)(i) == num, isn't it?
@21AniketThakre
@21AniketThakre 2 жыл бұрын
@@serveshchaturvedi2034 yes that's correct,l👍🏻
@diptamoy12
@diptamoy12 2 жыл бұрын
Sir please make a video on Gsoc and its guidelines and how prepare for it.. whats skills and roadmap required.. please🙏🙏✨.... Please sir...make a guideline... You dsa bootcamp is❤️🔥
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Sure I will
@Cloud-577
@Cloud-577 2 жыл бұрын
I was waiting for this!! When is dp lecture will be out
@NehaVerma-il1us
@NehaVerma-il1us 2 жыл бұрын
Can u PLZZ tell when will this course will be finished ❤️❤️❤️
@aakashyadav9117
@aakashyadav9117 Жыл бұрын
@kunal i cound not get the time complexity of n queens with akra bazi , but i was able to get it through substitution method , request you to made one video where there are functions like T(n) = N*T(N-1) + g(n) like this
@anshulgoel1940
@anshulgoel1940 Жыл бұрын
Sudoku is not solved in the final printed answer
@gem13259
@gem13259 Жыл бұрын
U made it very easy to me tqq kunal❤✌
@shyamkedia4202
@shyamkedia4202 2 жыл бұрын
Ho could have earn lacks thru this ... Thaxxx bruu
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Always free for all.
@vigneshp9961
@vigneshp9961 Жыл бұрын
can someone help me out, why do we "return" at line 16 in the N Knights problem (timestamp: 46:12), would be highly appreciated
@anshultripathi8902
@anshultripathi8902 Жыл бұрын
here col=n(board length) if you dont return the code will go aheaa and run issafe function for c=n which will return true and obv u cant place knight there because its not the part of the board also then col will keep on increasing and we dont have any base case for c>n resulting in infinite loop. HOPE U UNDERSTAND :)
@nishu0766
@nishu0766 Ай бұрын
Kunal please upload DP and graph series
@siddheshsurve6608
@siddheshsurve6608 2 жыл бұрын
Sir ji plz ye course band mat karna or delete bhi nahi karna 🥺😄🤩
@anmolsharma9539
@anmolsharma9539 2 жыл бұрын
39:39 knight is respectable
@devjeff3192
@devjeff3192 2 жыл бұрын
Thank you soo much for this awesome content, bro ! I learned a lot from in these series !!!
@lakshyadhawan800
@lakshyadhawan800 4 ай бұрын
in sudoku output, in first row 2 and 6 are repeating and in second row 9 is repeating and many more
@yashkharche8661
@yashkharche8661 2 жыл бұрын
I code in JavaScript and Python, will watching the lectures from the beginning be beneficial? Will the Theory be beneficial?
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
yes
@hassankazmi5443
@hassankazmi5443 2 жыл бұрын
Great job man, you make it look so easy
@itsvk3678
@itsvk3678 2 ай бұрын
You are my God ❤
@akhilbisht798
@akhilbisht798 10 ай бұрын
Hey, This is great but in some row same digits are repeated in sudoko solver.
@YouCodeRK
@YouCodeRK Жыл бұрын
Kindly check soduko solver output again ....that is giving wrong output . first line has repeated 2,row 6 has 1 repeated, 9th row has 6 repeated and so no...
@DevanshuAugusty
@DevanshuAugusty Жыл бұрын
that count method only work in java ..in c++ you have to pass it in the argument by reference.
@Vaibhav-h5p
@Vaibhav-h5p 2 жыл бұрын
Kunal, we cannot solve backtracking problems by Akra-Bazzi method as the coefficient of T(N-1) is not constant (it's N). I searched for it on the internet and found no solution with Akra-Bazzi method.
@MayankCodes
@MayankCodes 3 ай бұрын
The backtracking is not correctly applied in Sudoku solver. Everytime return true in solve(board) hits and since if waa running before that else condition gets untouched making it no application of backtracking. Am I thinking right if anyone can tell??
@raktimghosal4562
@raktimghosal4562 2 жыл бұрын
Damn this course is lit 🔥🔥🔥
@chaitanyakumarboddu7117
@chaitanyakumarboddu7117 2 жыл бұрын
Thank you !!
@yaswanthkosuru
@yaswanthkosuru 2 жыл бұрын
this video deservs million of views by the by when dp lectures coming in your channel
@sameerakhatoon9508
@sameerakhatoon9508 Жыл бұрын
@KunalKushwaha 34:14 i believe this isn't linear recurrence relation with constant coefficient to use method you taught us in time complexity lecture, ig this could be solved using substitution method, but i could not end up with precise answer like that of yours as O(N! + N^3) = O(N!) i solved it in the following way T(n) = n*T(n-1) + O(n^2) => T(n) - n*T(n-1) = O(n^2) => (T(n))/n! - (T(n-1))/(n-1)! = O(n^2)/n! => (T(n))/n! = ∑ x from 2 to n (x/(x-1)!)] == ∑ x from 2 to n (1/(x-2)!)] by Maclaurin's expansion for e, => (T(n))/n! = O(e) => T(n) = O(n!*e) ignoring constant terms, we get T(n) = O(n!) can you please help me with elaborating more on your approach to solve this and get O(N! + N^3) as solution? else if someone who know kunal's approach please reply here, I'd really appreciate Thanks!
@tanishhhhhhh
@tanishhhhhhh 2 жыл бұрын
Enjoyed all your recursion videos except for this one, it seemed like u didn't really prepare before making this important video, it felt u were not really explaining but reading, but the other recursion videos helped me a lot so I am really grateful to u for making this series
@himanshuprataprana1002
@himanshuprataprana1002 23 күн бұрын
Kunal where is DP and graph videos
@abhishekpant5040
@abhishekpant5040 2 жыл бұрын
can anybody tell me what is n in 9^n*n in Sudoku solver complexity analysis ?
@sameerakhatoon9508
@sameerakhatoon9508 Жыл бұрын
sure, because we have n*n cells, also we can have 1 to 9 nums in each of cell, so 1st cell --> 9, 2nd cell--> 9, ... so on till n^2 cell --> 9, hence 9^(n*n)
@saibhargav9039
@saibhargav9039 2 жыл бұрын
Hey kunal just wanted to ask by when will this course be completed?
@muneebahmed3993
@muneebahmed3993 2 жыл бұрын
By the end of this month ig
@gauravgautam5963
@gauravgautam5963 2 жыл бұрын
@@muneebahmed3993 This is only the limitation of this course . It's already 6 months sep-feb but still we have covered only one data structure linked list
@gauravgautam5963
@gauravgautam5963 2 жыл бұрын
@@muneebahmed3993 This is only the limitation of this course . It's already 6 months sep-feb but still we have covered only one data structure linked list
@divineknowledge1.9lakhview29
@divineknowledge1.9lakhview29 Жыл бұрын
at 1:07:47 i think board[i][col] should be there i am confused how he solve that using that only
@anwaraftab5401
@anwaraftab5401 3 ай бұрын
I think you're right, cuz if we put board[row][col] everytime then how will it work...
@malishagavali9225
@malishagavali9225 2 ай бұрын
can anyone explain why is it O(n^2) in recurrance relation ofr NQueens
@sadekshaikh629
@sadekshaikh629 Жыл бұрын
The code for sudoku solver is giving wrong answer in video itself please provide the correct solution and code for it
@Valysis
@Valysis 8 ай бұрын
it feels u were looking answer for sudoku solver problem and then explaining.
@nancychhatwal2615
@nancychhatwal2615 8 ай бұрын
COMPLETE N-KNIGHTS CODE WITH COMMENTS:- import java.util.Arrays; public class NKnights { public static void placeKnights(boolean[][] board,int row,int col,int k){ //if all the knights are placed,display the board if(k == 0){ displayBoard(board); System.out.println(); return; } //if we have reached the last row and last col, we don't have to do anything if(row == board.length && col == board.length){ return; } //if we have reached the last col of a row,we'll move to next row and start looking from first col if(col == board[0].length){ if(row+1
@Deepak-ls1yt
@Deepak-ls1yt Ай бұрын
🫡
@TanmaySarkar
@TanmaySarkar 2 жыл бұрын
Recursion done ! Thank You ❤
@venkateshwarrao5321
@venkateshwarrao5321 2 жыл бұрын
Tanmay how was this playlist? Is this playlist good as compared to Striver's playlist??
@dineshmadduru7043
@dineshmadduru7043 3 ай бұрын
Thank You:)
@hritikapal683
@hritikapal683 2 жыл бұрын
100k supersoon 💖
@ShubhamGupta-lb5cx
@ShubhamGupta-lb5cx Жыл бұрын
Great explanation 👍
@ChabPoha
@ChabPoha 4 сағат бұрын
its not solving in many ways tthere its just showing the same answer repeatedly since calling solve (board ) repeatedly with true
@harshagarwal7832
@harshagarwal7832 2 жыл бұрын
Bhai apne sliding video ke uppar video banaya hai kya🤔🤔🤔mil nhi rha hai 🥲
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
After hashmaps
@harshagarwal7832
@harshagarwal7832 2 жыл бұрын
Okk brother 🤩🤘
@mustakimmahmud1960
@mustakimmahmud1960 11 ай бұрын
Bro ! In 1:17:01 this sudoku is not correct . in first row there is 6 appears in two times .
@amanbhati2712
@amanbhati2712 2 жыл бұрын
Hi Kunal, Where can I find the Dynamic Programing videos..??
@doshanthsai8726
@doshanthsai8726 2 жыл бұрын
Bro opps concepts
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
next
@shreydholakia5308
@shreydholakia5308 2 жыл бұрын
Can u put some content on dbms...?
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
will do when we do dev
@mercenary-coder
@mercenary-coder 6 ай бұрын
bro giving his 100% to promote his previous videos
Backtracking Introduction + Maze Problems - Theory + Code + Tips
1:28:10
Kunal Kushwaha
Рет қаралды 200 М.
L14. N-Queens | Leetcode Hard | Backtracking
36:55
take U forward
Рет қаралды 411 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 20 МЛН
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,4 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,4 МЛН
Man Mocks Wife's Exercise Routine, Faces Embarrassment at Work #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 6 МЛН
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 568 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 403 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,6 МЛН
OOP 1 | Introduction & Concepts - Classes, Objects, Constructors, Keywords
1:42:27
The N Queens Problem using Backtracking/Recursion - Explained
14:29
Back To Back SWE
Рет қаралды 137 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 667 М.
N-Queens - Backtracking - Leetcode 51 - Python
17:51
NeetCode
Рет қаралды 169 М.
Solve Coding Interview Backtracking Problems - Crash Course
36:51
freeCodeCamp.org
Рет қаралды 182 М.
L15. Sudoko Solver | Backtracking
26:10
take U forward
Рет қаралды 275 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 20 МЛН