Тёмный

7. Subsequences, Power Set using Recursion Code - Practise with me, understand code in detail! 🚀🔥 

Code From Scratch - Keerti Purswani
Подписаться 14 тыс.
Просмотров 6 тыс.
50% 1

You can practise the question here-
bit.ly/3cqq0Dy
𝐃𝐨𝐧'𝐭 𝐜𝐥𝐢𝐜𝐤 𝐡𝐞𝐫𝐞- bit.ly/3PCiXWD
Subscribe and hit the notification icon to get notifications and learn with me everyday!! ❤️❤️
#dsa #softwaredeveloper #interviewpreparation

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 58   
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
How does it feel to solve medium level recursion questions? ❤️
@cricketguru7596
@cricketguru7596 2 года назад
Visualization of recursive tree was little difficult? Having a high hope, after going through this series i will be more comfortable
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
@@cricketguru7596 let me know if you have any doubts. M here. You just watch the videos properly!
@cricketguru7596
@cricketguru7596 2 года назад
@@codefromscratch-keertipurswani yes sure
@Nishchay-kc1gb
@Nishchay-kc1gb 2 года назад
Now i am understanding more clearly and speed has increased a bit
@yuv09
@yuv09 2 года назад
The question is rated easy, but it seems like hard one 😅😅😅
@unknowncoder409
@unknowncoder409 2 года назад
Yes the second catch was that we had to remove the empty string from the resultant vector as it is asked in the problem statement. Thank you Mam for great teaching!!!
@sameer9368
@sameer9368 2 года назад
Since I am your senior experience wise... I always follow your video the way you provide detail explanation...please keep motivating us
@Hustle_bussle
@Hustle_bussle 2 года назад
I hope I can explain every DSA concept as easily as you do!!Looking forward to that day✌🤞
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
You will be able to! I am so sure ❤️
@saurabhbera4833
@saurabhbera4833 2 года назад
I used to get scared using recursion. But these days I think recursion is fun it's all about recursive faith😂❤️
@rajinderkaur7658
@rajinderkaur7658 2 года назад
Great explanation mam👌gaining confidence day by day only because of you💪thankyou❤more power to you❤❤❤
@swathijaishetty460
@swathijaishetty460 2 года назад
Thanks for putting so much of efforts, to make us understand clearly :)
@prakashbtw678
@prakashbtw678 2 года назад
I have been waiting for this. Thank you thank you
@MdRizwan-uu9dv
@MdRizwan-uu9dv 2 года назад
Thankyou didi for this wonderful explanation👌👍👌👍👌
@nidhikumari1479
@nidhikumari1479 2 года назад
Thank you so much mam! Solving a medium level rec. ques. feels great.👍
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
Yaaaay. Awesome Nidhi!
@bharanisrianbalagan1924
@bharanisrianbalagan1924 2 года назад
such a nice explanation ever
@MaheshBabuGurram
@MaheshBabuGurram 2 года назад
Hi Keerthi, These videos are really helpful. I have shared it with my friend and they subscribed to the channel. One suggestion, could you discuss time and space complexity for each of the problems that you are covering?
@arjunyadav-kt5jr
@arjunyadav-kt5jr 2 года назад
i could figure out the second catch easily, because keerti does not let us forget anything!!
@rtarts1524
@rtarts1524 2 года назад
Thank You Mam..
@muthukumara8792
@muthukumara8792 Месяц назад
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target. Each number in candidates may only be used once in the combination. mam could you make a video to solve this?
@simran1277
@simran1277 2 года назад
SUMMARY ============================= Write code for including character and excluding character Push "curr_subsequence" to "ans" when curr_idx == n Another way to remove the empty string from "ans" is to pop_back before sorting REASON: empty string will always be added to "ans" at last only Alternative code class Solution{ public: void helper(string s, int curr_idx, int n, string curr_subsequence, vector &ans){ if(curr_idx == n){ ans.push_back(curr_subsequence); return; } // include character helper(s,curr_idx+1,n,curr_subsequence+s[curr_idx],ans); // not include character helper(s,curr_idx+1,n,curr_subsequence,ans); } vector AllPossibleStrings(string s){ vector ans; helper(s,0,s.length(),"",ans); ans.pop_back(); // remove empty string sort(ans.begin(),ans.end()); return ans; } };
@nidhibansaliitr
@nidhibansaliitr 2 года назад
I wrote it like a mix of iterative + recursive manner. Please share your view point on the code. void helper(List list, String s, String sChar, int total, int counter){ char [] charArray = s.toCharArray(); if(!list.isEmpty()){ int size = list.size(); for(int i =0; i
@ashwinisunilchoudhari9660
@ashwinisunilchoudhari9660 2 года назад
I have one doubt mam , after include helper get executed one time ,the next exclude helper should get executed.? but in explanation according to my understanding after first helper reached to n , base condition is executing and then exclude helper.
@paraschauhan4466
@paraschauhan4466 2 года назад
I also write dii current . length is greater than zero than res.pushbackcurrent
@jagdishkumawat2738
@jagdishkumawat2738 2 года назад
💯🔥
@ashwaniarchivee
@ashwaniarchivee 2 года назад
Present ma'am.
@mohdhaseeb9818
@mohdhaseeb9818 2 года назад
Present Ma'am
@ShubhamSingh-gk8vp
@ShubhamSingh-gk8vp 2 года назад
let goooo !!
@GauravKumar-by1yt
@GauravKumar-by1yt 2 года назад
Thank you
@cricketguru7596
@cricketguru7596 2 года назад
Present 🔥
@surojitsantra7627
@surojitsantra7627 2 года назад
🙋
@nidhibansaliitr
@nidhibansaliitr 2 года назад
I was able to write code by myself. But your code is always more crisp.
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
Hi Nidhi, could you please drop a mail (just a hi would do) at workwithkeertipurswani@gmail.com
@nithishnair6265
@nithishnair6265 2 года назад
Present 👍
@myth__un
@myth__un 2 года назад
Present ma'am
@JardaniJovonovich192
@JardaniJovonovich192 2 года назад
Thanks for the video. In GFG, it is mentioned that the expected space complexity is O(n*2^n). Shouldn't the SC be just O(2^n) ?
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
Will cover this in a youtube short tomorrow. Should have talked about it. Thanks for pointing it out ❤️
@div0007
@div0007 2 года назад
Think of SC as an array of array, where total elems in the outer array are 2^N and each element(which is also an array of char aka string) can have max length of N. so SC will be size each elem * number of elems or O(N*2^N)
@Nishchay-kc1gb
@Nishchay-kc1gb 2 года назад
I am solving
@VishalYadav-vt4cw
@VishalYadav-vt4cw 2 года назад
🙋‍♂️
@hackerIfeelYou
@hackerIfeelYou 2 года назад
Present ma'am 🤞
@varunendra.singh_
@varunendra.singh_ 2 года назад
Day 19🙋
@jasmindersingh6708
@jasmindersingh6708 2 года назад
We found 8 number of subsequences but they ask for only 7 subsequences. The extra one is empty (" ").
@vigneshiyer1765
@vigneshiyer1765 2 года назад
Present mam!!
@deepchill5295
@deepchill5295 2 года назад
Day 19- present 🙋‍♂️
@devilnk8475
@devilnk8475 2 года назад
Didi ...plz live stream ...
@codefromscratch-keertipurswani
@codefromscratch-keertipurswani 2 года назад
What should we discuss in live stream? Anything specific in mind?
@devilnk8475
@devilnk8475 2 года назад
@@codefromscratch-keertipurswani 'Mam' if we have any doubts ask in live stream and we connect to directly...🥰🥰
@sravantipris3544
@sravantipris3544 Год назад
good
@utkarshawasthi1665
@utkarshawasthi1665 2 года назад
Coding Prac Day 7 V3
@prashanthiaruna8501
@prashanthiaruna8501 2 года назад
Am still in binary search only i practice in weekends as I don have time is this normal to be this slow ??
@arunkumarmohandas4420
@arunkumarmohandas4420 2 года назад
Present
@learner7940
@learner7940 Год назад
Did anyone do this in JS ?
@sachinaghera8189
@sachinaghera8189 2 года назад
Present
Далее
L6. Recursion on Subsequences | Printing Subsequences
25:01
КОСПЛЕЙ НА СЭНДИ ИЗ СПАНЧБОБА
00:57
5 Simple Steps for Solving Any Recursive Problem
21:03
Recursion Subset, Subsequence, String Questions
1:23:56
Просмотров 308 тыс.