Lecture 61: Recursion on Subsequence || Print All Subsequence || Generate Parentheses

  Рет қаралды 22,416

Coder Army

Coder Army

Күн бұрын

Пікірлер: 87
@asthetic_striker
@asthetic_striker Жыл бұрын
00:01 Learn how to generate all subsequences of an array 02:20 Exploring the generation of subsequences using logic and intuition 06:32 Explanation of making choices in recursion 08:39 Explaining the choices and consequences of decision-making. 13:04 Understanding and solving the classical subsequence problem with clarity. 15:07 Understanding the process of generating and printing all subsequences of an array. 19:29 Understanding recursion on subsequences 21:22 Understanding index and subsequence in the code 25:13 Exploring recursion on subsequences in arrays. 27:16 Explanation of recursion 31:11 Recursion complexity is n^2 33:02 Understanding time and space complexity in recursion and subsequence generation. 37:35 Printing subsequences and handling errors 39:59 Demonstrating usage of vectors and references in the code. 44:07 Understanding recursion and backtracking 45:51 Exploring the generation of subsequences 50:18 Generating subsequences of a string 52:10 Explaining how to solve subsets 56:49 Creating logic for generating valid parenthesis combinations 58:45 Exploring the validity of a sequence of parentheses 1:02:48 Discussion on adding choices on the left and right 1:04:46 Recursive generation of parentheses subsequence 1:09:00 Explaining the process of adding left and right to a sequence 1:11:11 Recursion on subsequence involves making choices between adding to the left or right. 1:15:33 Storing subsequence strings inside a vector 1:17:27 Implementing recursion on subsequence with conditions 1:22:05 Recursion on subsequence has exponential time complexity 1:23:46 Implementing the 'Generate Parentheses' problem using recursion and vector string in C++. 1:28:06 Recursion is key to solving complex problems
@DebugYaar
@DebugYaar 11 күн бұрын
I was watching striver lec6 of recursion playlist of the same question, but striver made it so complex to understand this question. And here our Rohit bhaiya made it so simple ☺😍
@coder-kgp
@coder-kgp Жыл бұрын
such a good content without any cost.........Love u bhaiyya......sab achhe se chamak rha hai!!!
@codewithjaydangi
@codewithjaydangi 6 ай бұрын
Thankyou so much Bhaiya I had went through striver, love babaar but didn't get the topic but u have crystal cleared it ❤❤❤
@harshittripathisonu2379
@harshittripathisonu2379 4 ай бұрын
kitna kar lia boss!!
@chaitanyaroy6781
@chaitanyaroy6781 3 ай бұрын
gooooooooood !! than u for creating these people ...was trying to understand this for past 7 hrs continously ....went to multiple channels ...tried to understand through chatgpt, ...dry and what not. 1 dry run all it takes to understand anything
@Vardanaggarwal
@Vardanaggarwal Жыл бұрын
such a amazing question bhaiya generate parenthesis.🙏
@arunfrancis5921
@arunfrancis5921 Жыл бұрын
There is a lot of hate in this world. Let's assume that one person didn't like my video hell put a hate comment and go but on the other hand, the person who understood the concept won't be commenting. That hits hard for a content creator, especially the content you give for free. So this changed my perspective of not commenting on the great content. Thank you bhaiya.
@Ravi-wn4pe
@Ravi-wn4pe Жыл бұрын
Right
@satyam6943
@satyam6943 Жыл бұрын
Feeling like I am flying after solving this last question Ram Ram 🚩
@GaneshKurhe-n1t
@GaneshKurhe-n1t 10 ай бұрын
amazing question bhaiya generate parenthesis
@GaneshSinghRawat-d8u
@GaneshSinghRawat-d8u 13 күн бұрын
amazing content sir love from uk19
@study-yd6es
@study-yd6es 2 ай бұрын
Your way of explaining topics is just amazing
@AbhishekKumar-lu3lp
@AbhishekKumar-lu3lp Жыл бұрын
H.W : print all the sum of possible subsets void subsequence(int arr[],int index,int n,int sum, vector&ans){ if(index==n){ ans.push_back(sum); return; } subsequence(arr,index+1,n,sum+arr[index],ans); subsequence(arr,index+1,n,sum,ans); } NOTE; if we want to print total sum we just need to pass variable ans instead of vector and plus sum into ans in base case
@Rohangamin517
@Rohangamin517 10 ай бұрын
Rohit is learning from Rohit😊😊
@Priya77772
@Priya77772 Жыл бұрын
You are doing very nice job bhaiya, keep it up. Thank you so much:)
@rajaryan5884
@rajaryan5884 Жыл бұрын
Bhaiya thank you so much . Aap best teacher ho Roz naye videos ka intezar rehta hai
@SmritiSharma-vv7ib
@SmritiSharma-vv7ib 4 ай бұрын
love your dsa series bhaiai
@heetpatel3037
@heetpatel3037 8 ай бұрын
Bhaiya chamka ekdum Krystal clear 👍🏻
@MoshiurRahman-mp4bq
@MoshiurRahman-mp4bq 4 ай бұрын
🎉🎉🎉🎉🎉well done...love from Bangladesh 😮
@shubhamkumarjha9192
@shubhamkumarjha9192 Жыл бұрын
Good morning bhaiya ji 💖
@mdpsycho2op670
@mdpsycho2op670 Жыл бұрын
maza aagya bhaiya..thank uuuu
@suryxnz
@suryxnz 2 ай бұрын
space complexity will be O(n^2) as the ans vector containing strings of 2n size aprroximately 2n times
@RahulGupta-wv7lv
@RahulGupta-wv7lv 10 ай бұрын
sab chamak gaya sir ji
@nishantraj7209
@nishantraj7209 5 ай бұрын
very good explanation 😄
@satyam6943
@satyam6943 Жыл бұрын
Sc = 2*n as temp takes 2n space and height of tree is also 2n
@Vardanaggarwal
@Vardanaggarwal Жыл бұрын
we will take only one side depth. of tree
@sauravshishodia.91
@sauravshishodia.91 Жыл бұрын
sc=2^n-1 correct
@sumitsahu9591
@sumitsahu9591 Жыл бұрын
you are the best
@MOHAMMADRABBANI-d3f
@MOHAMMADRABBANI-d3f Ай бұрын
2nd nov 4:51 saturday❤ done chamak gaya bhayya
@enghimanshu
@enghimanshu Жыл бұрын
Good Morning bhaiya ❤
@SouravAgarwal-by4fe
@SouravAgarwal-by4fe 2 ай бұрын
Thank you so much 🙏🙏❤❤
@shrishtdev9961
@shrishtdev9961 Жыл бұрын
best teacher on youtube❤❤❤
@ankushladani496
@ankushladani496 Жыл бұрын
Done Bhaiya... Day 86/100 ✅
@kumkumsijeriya
@kumkumsijeriya Жыл бұрын
bhaiya mene apka dsa course join kia h and muje bohot kuch sikhne ko mil rha h apse coding bohot tough lgti thi pr ab bilkul easy ban gai h.. bhaiya plz kya ap ek guidance de skte internship k regarding.. muje koi bhi shi guidance nhi mil rhi h kisi bhi platform se and im sure ki ap bilkul shi guide krege plz bhaiya ek chota sa vedio bana skte h
@ankushladani496
@ankushladani496 Жыл бұрын
Thanks Bhaiya...❤🎉
@akshaythakur4231
@akshaythakur4231 11 ай бұрын
Chamak gaya ❤
@we_know1044
@we_know1044 Жыл бұрын
Good morning 🌄🌞
@Rambo-zn5dr
@Rambo-zn5dr 3 ай бұрын
one more method using bit manipulation vector subsets(vector& nums) { vector ans; vector temp; int size=nums.size(); for(int a=0;a
@tripurarisen4362
@tripurarisen4362 4 ай бұрын
Chamak Gaya bhaiya ji
@Ravi-wn4pe
@Ravi-wn4pe Жыл бұрын
Good Morning Bhaiya
@deepakladha6610
@deepakladha6610 7 ай бұрын
Sir I believe that at 29:28, the time complexity may be O(n*2^n) because at each node, we push the temp vector into the ans vector, which takes O(n) time in the worst case. Please correct me if I'm wrong. Anyway thank you so much sir for this lecture.
@Noobiee_FPS
@Noobiee_FPS Жыл бұрын
sab smjh aa gya bhaiya
@YashSaini007
@YashSaini007 Жыл бұрын
Bhaiya Radhe Radhe 🙏
@NaveenPatil-nb7lz
@NaveenPatil-nb7lz 2 ай бұрын
Thank you bro!!
@iamalcohishan106
@iamalcohishan106 Жыл бұрын
Good bhaiya
@ManasNandMohan
@ManasNandMohan 11 ай бұрын
Nyc Explanation
@pleasehaveasit
@pleasehaveasit 10 ай бұрын
thanks bhaiya😍
@stoicsaga906
@stoicsaga906 7 ай бұрын
Q1->Given an array of size n, print all the sums possible from its subsequence. #include #include using namespace std; void squence(int arr[],int idx,int n,vector&ans,vector&temp){ if(idx==n){ ans.push_back(temp); return; } squence(arr,idx+1,n,ans,temp); temp.push_back(arr[idx]); squence(arr,idx+1,n,ans,temp); temp.pop_back(); } int main() { int arr[]={1,2,3}; int n=sizeof(arr)/sizeof(arr[0]); vectorans; vectortemp; squence(arr,0,n,ans,temp); int sum=0; for(int i=0;i
@paradise836
@paradise836 2 ай бұрын
thank you :)
@shashank3374
@shashank3374 10 ай бұрын
Nice 👍
@AnandSahab-26
@AnandSahab-26 Жыл бұрын
Sir pending home work sheets ko upload karaiye in google drive .
@siddheshpandey7905
@siddheshpandey7905 8 ай бұрын
chamak gya🙂
@ShyamAgarwal-z7y
@ShyamAgarwal-z7y Жыл бұрын
thank u so much bhaiya
@Anonymous_EngineerX
@Anonymous_EngineerX 2 ай бұрын
if left < right then how left = 3 and right = 3 possible? or jab left ki value 2 ho gay tohi ruk jana chaiye tha na q ki left 3 execute nahi hoga coz left to equal hojayega n ke
@Rishi_s.corner
@Rishi_s.corner 9 ай бұрын
chamak gaya vahiya
@GopalKumar-xu3iw
@GopalKumar-xu3iw Жыл бұрын
Day 86/180 done ✅✅✅✅✅✅
@SumitKumar-uw6qn
@SumitKumar-uw6qn Жыл бұрын
Nice explanation bhai
@YashSaini007
@YashSaini007 Жыл бұрын
Day 86/180 #180DaysOfCode
@relaxingtime2411
@relaxingtime2411 Жыл бұрын
Coder Army is OP
@vikasgupta5772
@vikasgupta5772 Жыл бұрын
Good morning bhaiya Mai sirf gfg pe problems solve kr rha hun, kya ye jruri hai hmko kai sare plateform pe questions solve krna hai, ya sirf gfg pe problem solve krke i can comptete with top coders, please guide me
@amanprajapati6301
@amanprajapati6301 Жыл бұрын
Bhai ak hi plateform me kar koi dikkat ni
@dipakmali9817
@dipakmali9817 10 ай бұрын
Day 86/100 ✅
@Mohit_kashyap836
@Mohit_kashyap836 Жыл бұрын
Bhayaa mai abhi college ja rahun library mai baith ke pura karunga ❤
@Mohit_kashyap836
@Mohit_kashyap836 Жыл бұрын
@rudeguy9024 🗿
@relaxingtime2411
@relaxingtime2411 Жыл бұрын
Bhaiya aaj video ki brightness thodi casual he
@goindia777
@goindia777 Жыл бұрын
Bhaiya video is some dark 😮
@manojkumarmandal9461
@manojkumarmandal9461 9 ай бұрын
Bhaiya vector wale me error show ho rha hai
@OK-ku8ez
@OK-ku8ez Жыл бұрын
int maxel(int arr[], int index) { if(index == -1) return INT_MIN; if(arr[index] > maxel(arr, index - 1)) return arr[index]; } Bhaiya isme ' else return maxel(arr, index - 1) ' likhna jaroori hai? Mai jab is statement to hata raha hu to last element to print kar de raha hai.
@thorff7423
@thorff7423 Жыл бұрын
Bhaiya jab live aaya karo to pahle bata fiya karo....
@deep_singh01
@deep_singh01 Жыл бұрын
Day 86/180 👍👍
@itshirdeshk
@itshirdeshk Жыл бұрын
Day 86 ✅🔥
@zafrul_islam
@zafrul_islam Жыл бұрын
done✅✅✅✅✅
@ritikkumar-dz8nj
@ritikkumar-dz8nj Жыл бұрын
Day 86
@jaisriRam4
@jaisriRam4 5 ай бұрын
❤❤❤😊
@Aryan-wl7mc
@Aryan-wl7mc Жыл бұрын
Done
@IR20025
@IR20025 5 ай бұрын
IR07121D
@satyam6943
@satyam6943 Жыл бұрын
Ab maza aayega
@simmi641
@simmi641 6 ай бұрын
@vijaysingh-n6p9j
@vijaysingh-n6p9j 5 ай бұрын
🥰😍
@manishsati-wv8xz
@manishsati-wv8xz 11 ай бұрын
Chamak gaya
@DesiMrBean7
@DesiMrBean7 Жыл бұрын
@vishnusingh2300
@vishnusingh2300 11 ай бұрын
15
@heisenberg-2k24
@heisenberg-2k24 3 ай бұрын
chamka
@MOHAMMADRABBANI-d3f
@MOHAMMADRABBANI-d3f Ай бұрын
2nd nov 4:51 saturday❤ done chamak gaya bhayya
@Virat-k3u
@Virat-k3u Жыл бұрын
day 86
Lecture 62: Recursion on Subset Sum || Target Sum
1:04:24
Coder Army
Рет қаралды 13 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Recursion Subset, Subsequence, String Questions
1:23:56
Kunal Kushwaha
Рет қаралды 337 М.
Study Algorithms With Us (LIVE)
8:00:40
James Peralta
Рет қаралды 582
Lecture 75: Polymorphism and Virtual Function in C++
56:32
Coder Army
Рет қаралды 51 М.
Quick Sort For Beginners | Strivers A2Z DSA Course
35:17
take U forward
Рет қаралды 479 М.
Recursion Tutorial - Basics to Advanced | Part 1
46:22
Apna College
Рет қаралды 44 М.
Recursion in One Shot | Theory + Question Practice + Code | Level 1 - Easy
1:25:04
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН