Combinations | INTUITIVE | Backtracking Template | Two Ways | Similar Problems | Leetcode-77

preview_player
Показать описание
****************Similar Qns************

This is the 7th Video on our Backtracking Playlist.
In this video we will try to solve a classic Backtracking Problem Combinations - (Leetcode-77).

Share your learnings on LinkedIn, Twitter (X), Instagram, Facebook(Meta) with hashtag hashtag #codestorywithmik & feel free to tag me.

Trust me, this will no longer be a Medium Problem. I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.

We will do live coding after explanation and see if we are able to pass all the test cases.

Problem Name : Combinations
Company Tags : Meta

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips
#interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook
Рекомендации по теме
Комментарии
Автор

Your Channel is the best channel i have found on yt so far, In depth Explanation is what everyone needs at beginner level and ur channel is the best, Keep on Going Brother u Will Do great.

rohanchoudhary
Автор

Your way of explaining the concept is unique and very easy to understand. Please continue this series. Backtracking ++;

headburstergaming
Автор

Solved both Similar Qns on Description also. Thanks to you ❣❣❣❣

wearevacationuncoverers
Автор

The first approach was standard and I was able to code it on my own, but the second approach was different. Watching your videos never ends up disappointing me. Thanks!

sauravchandra
Автор

Dude. This is crazy - I didn't even understand this problem from neetcode's solution but understood this 100% from this explanation!! Kudos to you. Keep uploading. M gonna binge watch your channel ❤️ cheers.

udaykulkarni
Автор

nice explanation I have gone through many tutorial but could't able to understand it but this explanation clear my all doubts regarding backtracking.
Thank you

VivekMishra-blzz
Автор

Your explaination is something like what i always in search!

hardikgupta
Автор

Sir, your way of explaining is so good and remembering. Please bring more dsa concepts with problems. I believe that your subscriber is rapidly increasing soon

ankitgupta
Автор

Bhai you are simply great. Issay asaan tarike se koi backtracking nahi sikha sakta 🙏🙏 I subscribed your channel ❤❤❤

kapilrules
Автор

your explanations are so crystal clear to thr point, so helpful in building the intution

preetiipriya
Автор

Great work, looking forward to follow all your videos!

sauravsharma
Автор

thank you for the follow up questions in description, I generally got stuck at backtracking problem but after watching this video I solve those follow up questions on my own .Lots of love😊😊

souravkumar
Автор

Love your explanation style, very simple and intuitive. Please keep this intuition, relating with other questions and explaining patterns in questions, which helps so much. ♥♥

adityavaste
Автор

Love your explanation style, very simple and intuitive, thank you sir 🥰

sawankushwaha
Автор

A complete video explaining the concept of backtracking will great!

YashSinghal
Автор

may god bless you sir. you are the confident for students like me who are below average in coding.. you are the KING OF DSA

layathal
Автор

java code : "class Solution {
List<List<Integer>> result=new ArrayList<>();
public List<List<Integer>> combine(int n, int k) {
List<Integer> temp=new ArrayList<>();
backtracker(1, n, k, temp);
return result;
}
public void backtracker(int start, int n, int k, List<Integer> temp)
{
if(k==0)
{
result.add(new ArrayList(temp));
return;
}

if(start>n) return;

temp.add(start);
backtracker(start+1, n, k-1, temp);
temp.remove(temp.size() - 1);
backtracker(start+1, n, k, temp);

}
}
"

SunnyKumar-xcfu
Автор

Earlier, I had issue understanding 2nd option, but with your tree diagram, it was easy!
I had called it siGEInclLoop pattern (si = start idx -- here is it number, GE = greater than or equal to, GEInclLoop -- i varies from si to max possible in the loop). The 1st option is siEXIN pattern (excl, incl si element)

anant
Автор

Detailed explanation as always, thank you!

recessionriche
Автор

Khaandani backtracking wala question...vvvez😂❤ easily khud s solve kardiya

AbhishekGupta-ifrb