Print N-bit binary numbers having more 1’s than 0’s for any prefix

  Рет қаралды 69,019

Aditya Verma

Aditya Verma

Күн бұрын

SORRY FOR THE LOW AUDIO, I AM STILL EXPERIMENTING WITH DIFFERENT AUDIO DEVICES AND QUALITIES.
Patreon Link: / adityaverma
Video Pdf Notes And Code: / 39695797
Problem Description: practice.geeks...
Given a positive integer N, print all N bit binary numbers having more 1’s than 0’s for any prefix of the number.
Input:
2
2
3
Output:
11 10
111 110 101 .
------------------------------------------------------------------------------------------
Here are some of the gears that I use almost everyday:
🖊️ : My Pen (Used in videos too): amzn.to/38fKSM1
👨🏻‍💻 : My Apple Macbook pro: amzn.to/3w8iZh6
💻 : My gaming laptop: amzn.to/3yjcn23
📱 : My Ipad: amzn.to/39yEMGS
✏️ : My Apple Pencil: amzn.to/3kMnKYf
🎧 : My Headphones: amzn.to/3kMOzM7
💺 : My Chair: amzn.to/385weqR
🛋 : My Table: amzn.to/3kMohtd
⏰ : My Clock: amzn.to/3slFUV3
🙋🏻‍♀️ : My girlfriend: amzn.to/3M6zLDK ¯\_(ツ)_/¯
PS: While having good gears help you perform efficiently, don’t get under the impression that they will make you successful without any hard work.

Пікірлер: 278
@ntesla5
@ntesla5 4 жыл бұрын
Thank you very much for awesome explaination . Most of the comment section of his all videos are usually requesting for different topics or correcting or asking for some sort of help. We all are so selfish , the guy is teaching (BEST in the world) and that to for free of cost. Despite getting a high salary job , he is still spending his value able time for us . I think we should accept it and appreciate his work and not force him to make video based on our requirements
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
❤️❤️❤️❤️❤️❤️❤️❤️
@akashmanna2099
@akashmanna2099 4 жыл бұрын
Nailed it 👌!
@akshatw7866
@akshatw7866 3 жыл бұрын
Exactly my thoughts!
@ADNANAHMED-eo5xx
@ADNANAHMED-eo5xx 3 жыл бұрын
@@TheAdityaVerma isi baat par video daal do yaar
@ayushmansingh5271
@ayushmansingh5271 3 жыл бұрын
@@ADNANAHMED-eo5xx 😂
@shrihariprajapati9996
@shrihariprajapati9996 3 жыл бұрын
Coded it on my own within 15 mins ! And just a week ago I couldn't even understand how recursion works ! Thanks man ! Legend ! 🙌
@nirmalwagh1976
@nirmalwagh1976 3 жыл бұрын
Can u please share code?
@aniketbhoite7168
@aniketbhoite7168 3 жыл бұрын
Initially add 1 in output string n pass no of zero as 0 n one as 1 n as n-1....then if o>z then we can add one or zero otherwise only one... Hope this helps
@AmarSingh-qj1pp
@AmarSingh-qj1pp 3 жыл бұрын
Hey can you solve the generating m bit gray code of gfg using recursion. I have been trying it but stuck on one test case. If possible pls do
@thinkingmad1685
@thinkingmad1685 2 жыл бұрын
Like did u code in ide with problem statement or just own ide
@Monkeydluffy-we2fk
@Monkeydluffy-we2fk 2 жыл бұрын
Ha maine bhi ..recursion ka master hu mai abh 😶..lol agle video dekhna hai cuz there
@satwikmishra60
@satwikmishra60 2 жыл бұрын
Trust me, this guy's a living legend. Just a month ago I couldn't even write a single line of code for a basic recursion problem and eventually ended up doing this question just after hearing the problem statement. 🎩📴
@piyushgupta9048
@piyushgupta9048 4 жыл бұрын
I was able to solve recursion questions but after this, I m able to solve problems in much lesser time. These videos gave me immense clarity on how to approach a question.
@manavshah7450
@manavshah7450 3 жыл бұрын
Watch the video till 12:19 and then code the solution yourself. You will definitely get it! Thank you aditya verma for all this. You are the best!
@swappy4515
@swappy4515 3 жыл бұрын
Yess I did the same
@Ssss-ox2nu
@Ssss-ox2nu 3 жыл бұрын
yes same me too
@sunnykumarjha9527
@sunnykumarjha9527 2 жыл бұрын
same vro😁 yar itna aasan bana diya hai bhai ne recursion ko😂
@AkashKumar-lr6hc
@AkashKumar-lr6hc 2 жыл бұрын
I did just by reading question ... He made me Jedi in recursion
@Ak-.-47
@Ak-.-47 3 жыл бұрын
Before Watching this series I was not able to approach basic problems of recursion....but now due to Your help i am easily able to do medium level questions.Thanku sir for this❤
@priyankarai7005
@priyankarai7005 4 жыл бұрын
did it myself. now going to look at solution. Thank u so much aditya
@darkndown
@darkndown Жыл бұрын
I, just like others in comments, wasn't able to write basic recursive code. However, after watching this playlist, I coded this ques just after hearing the problem statement. Thanks Aditya!
@HimanshuSingh-yh8lz
@HimanshuSingh-yh8lz 3 жыл бұрын
before starting this series I was having problem while solving problems of recursion and now I am solving the question before watching the explanation video..Thanks, Aditya Verma
@DroidHolicOfficial
@DroidHolicOfficial 2 жыл бұрын
Wow! You have explained previous problems so damn well that I didn't even have to watch this video to write the solution. Thanks a lot man!
@viditshah5944
@viditshah5944 4 жыл бұрын
Sir Awesome videos.This might be No.1 channel to prepare and clear the concepts... It gives too much bust for interview preparation..! Waiting for Backtracking problems..
@sumitkeshav4718
@sumitkeshav4718 4 жыл бұрын
A few moments later 😂😂! Great content as usual ❤✌
@AnupBarman-bd1ju
@AnupBarman-bd1ju 3 ай бұрын
coded it on my own again! the basics I've received from this playlist is unimaginable. hats off bhai.
@AnupBarman-bd1ju
@AnupBarman-bd1ju 3 ай бұрын
the code i've written for the gfg problem is here : class Solution{ public: void generate(int n, int one, int zero, string op, vector &v) { if (n == 0) { v.push_back(op); return; } if (n != 0) { string op2 = op; op2.push_back('1'); generate(n - 1, one + 1, zero, op2, v); } if (one > zero) { string op2 = op; op2.push_back('0'); generate(n - 1, one, zero + 1, op2, v); } return; } vector NBitBinary(int n) { vector v; string op = ""; generate(n, 0, 0, op, v); sort(v.begin(), v.end(), greater ()); return v; } };
@abhijitsaha4311
@abhijitsaha4311 3 жыл бұрын
You are great brother. I am one of those CS student who always preferred maintaining a safe distance from recursion. As a result I was getting feverish feeling whenever I was facing problems that need DP to solve. I came across your DP playlist first and after watching a few videos I felt if anyone can teach me Recursion, it is Aditya Verma only. Now I am solving problem before looking into your solutions. You are just a gift of GOD. Stay healthy and happy brother. Keep teaching us with your amazing teaching skills.
@ajitpawar7558
@ajitpawar7558 2 жыл бұрын
I was fearing the recursion. Whenever i saw recursion i tried to do it with loops but never got the answer in required time complexity. At the starting of the series he said that after completing the entire playlist you will become Jedi. And yes after completing i can say i have become Jedi in Recursion. Thanks a lot for helping me out. You are doing a great job here.... ❤️💯🔥
@ankitmishra3823
@ankitmishra3823 3 жыл бұрын
I saw all series of recursion and able to do question very easily and able to understand problems.
@Cool-ss7ph
@Cool-ss7ph 7 ай бұрын
Solved this question in 5 min, even before watching it, just on the basis of the knowledge gained from the previous videos in the playlist. Great work man.. hats off to you. 👏👏👏
@anshirk9770
@anshirk9770 3 жыл бұрын
11 minutes was sufficient due to your amazing explanation! Thank you so much bhaiyya :')
@harshitpatil6138
@harshitpatil6138 5 ай бұрын
Just click on video saw first 10 sec and think let me understand myselft about ip-op and ps click on the link and understand the problem then first try to make the recursive tree ofcourse first time I failed to do . then again think about the problem and retry to build the recursive tree and this time somehow I made it and see what I code it as you taugh once you made a recursive writing code will be cake work . so I just run code again test case and it passes😄 that is the power of your teaching . Thankyou aditya Bhaiya for your efforts ! You are The BEST 🙃.
@SHAH_SSC
@SHAH_SSC Жыл бұрын
i was literally able to solve this question on my own in the first go...all thanks to your efforts bro..( this playlist is must for everyone who thinks recursion sucks.)
@saloni8603
@saloni8603 3 жыл бұрын
Can't thank you enough for this awesome playlist 😭❤❤
@ranirathore4176
@ranirathore4176 2 жыл бұрын
The best about his videos is that after you watched the explanation of the problem, you can code by yourself irrespective of which language you code.
@rajeshramoju8837
@rajeshramoju8837 3 жыл бұрын
just saw the problem statement and boom i did myself ..thankyou
@saravind3153
@saravind3153 3 жыл бұрын
We need your tutorials sir big fan of you
@himanshumalik6913
@himanshumalik6913 2 жыл бұрын
Bhai, khud se kar lya sirf shuru ke 15 min video dekhi, question understand ke lye. Bina answer dekhe 😭😭😭😭😭 Thank you bhai.
@aayushpagare9366
@aayushpagare9366 2 жыл бұрын
OMG Aditya bhaiya you are magical.....i cant belive i came with the solution in just 5 minutes......TQSM ❤️❤️❤️❤️
@sarvagyaiitmadras8727
@sarvagyaiitmadras8727 3 жыл бұрын
really awesome content.Only one problem in videos me , voice thodi low rhti hai bhai tumhari, mtlb full audio krne pe bhi.
@shivambhardwaj5313
@shivambhardwaj5313 2 жыл бұрын
about to finish this playlist just one more question left, normally i dont even have to watch your complete video thanks to your explanation. thanks a lot hope u return to youtube
@hope-jh7bv
@hope-jh7bv 2 жыл бұрын
Thank you so much sir. With your help I am so much confident with recursion and backtracking. I was so depressed and having second option other than learning DSA. But finally I am able to solve medium range problems gradually and got my confidence back. I will be always grateful to you. Again, thanks a lot.
@rajshreebose1828
@rajshreebose1828 2 жыл бұрын
God Bless you, Buddy!!! was struggling with recursion since months now.
@shishirchaurasiya7374
@shishirchaurasiya7374 Жыл бұрын
Aditya Verma OP!!!!!! Love you so much..
@LokeshSharma-hm5jz
@LokeshSharma-hm5jz Жыл бұрын
Watching previous videos, the moment you said it is related to balanced parenthesis. I got the idea. Thanks
@tiyashadas5247
@tiyashadas5247 3 жыл бұрын
I solved a recursion problem on my own :') im not crying you are crying :') Thank you :') 🌻
@archanaa7747
@archanaa7747 2 жыл бұрын
tysm for this playlist. you explained each and everything very clearly. this playlist help me a lottt.
@ved7678
@ved7678 4 жыл бұрын
Thanks a lot bro for your effort. It's been a great help for me. Just a request can you please make videos on Greedy,backtracking and divide & conqueror
@shaikfahim1232
@shaikfahim1232 3 жыл бұрын
Include graph also
@user-go9vs3vm5d
@user-go9vs3vm5d 6 ай бұрын
thanks a lottttt solving recursion que - medium, hard easily after this
@adityajain5101
@adityajain5101 2 жыл бұрын
Your explanation is best ...better than most of the youtubers out there
@shubhamkumarjha2653
@shubhamkumarjha2653 2 жыл бұрын
Thanks a lot buddy .😍 Just week ago I can't able to solve simple prb but know I have lot of confidence .
@khushh.i
@khushh.i 3 ай бұрын
Sir, thank youuuuuuuu soooo much!!!!!!!
@aniketpathak2721
@aniketpathak2721 3 жыл бұрын
Amazing work bhaiya! Hands down, one of the best channel to learn algorithms. Will always be grateful for what I gained from this channel!
@vikasvk9174
@vikasvk9174 4 жыл бұрын
After looking at the problem statement. I solved it myself it only happen bcz of You Big Thank :)
@DebojyotiMandal
@DebojyotiMandal 4 жыл бұрын
Best playlist on recursion ever !!!!!!
@zaidshaikh8111
@zaidshaikh8111 2 жыл бұрын
I watched first two mins and solved the question!!! Aditya Bhaiyya, You are amazing!!!
@dewanganumesh11
@dewanganumesh11 4 жыл бұрын
Thanks @AdityaVerma....now i can realized how to approach for recursive problem. Keep up the good work :)
@vanshjain5960
@vanshjain5960 Жыл бұрын
I am wordless how good ur content is this is just awesome bhaiiii Love it❤❤❤❤❤❤
@amayatre3558
@amayatre3558 2 жыл бұрын
Thank you so much Bhaiya , because after following this playlist completely , I was able to solve this question just by reading the problem statement. Hats Off to you Bhaiya ..
@subrinasirajee530
@subrinasirajee530 2 жыл бұрын
Coded on my own way without seeing the full video. Thanks bro.
@mohit6215
@mohit6215 11 ай бұрын
I was able to think about it by yours grace❤
@vineeladonthu9266
@vineeladonthu9266 3 жыл бұрын
Thank you so much sir! the way you taught us to approach the problem is very good sir
@kushgupta6416
@kushgupta6416 2 жыл бұрын
I really liked your way of teaching and keep on building problems based on previous thinking. it helps a lot to grasp concepts. just one suggestion. try to provide a few examples of a problem that requires for loop along with recursion. like print all permutation of array elements.
@codertan4109
@codertan4109 2 жыл бұрын
Thank You so much Aditya! I was able to code by myself!!!
@Prateek_Mantry
@Prateek_Mantry 5 ай бұрын
thank you.
@mayur_madhwani03
@mayur_madhwani03 3 жыл бұрын
Itna sahi samjhaya ki khudse hi code likh liya ❤️
@bhairavas2528
@bhairavas2528 3 жыл бұрын
Java Solution. A bit different from Aditya's approach public static void solve(int one,int zero,int n,String output) { if(n==0) { System.out.println(output); return; } if(one == zero) { String op1 = output; op1+="1"; solve(one+1,zero,n-1,op1); }else { String op1 = output; String op2 = output; op1+="1"; op2+="0"; solve(one+1,zero,n-1,op1); solve(one,zero+1,n-1,op2); } }
@aashimaa2681
@aashimaa2681 2 жыл бұрын
Thanks Adi! You are the best
@priyanjali2857
@priyanjali2857 2 жыл бұрын
Thank you so much for the recursion playlist FINALLY I UNDERSTOOD THE CONCEPT Also please could you also make videos on backtrackingggg Thanks dude!!!!
@shibanidas7018
@shibanidas7018 3 жыл бұрын
Finished without seeing the solution !!! public void generate(String op, int n0, int n1, int N, ArrayList list){ if(n0 + n1 == N){ list.add(op); return; } String op1 = op + "1"; generate(op1, n0, n1-1, N , list); if(n0 > n1){ String op2 = op + "0"; generate(op2,n0-1,n1,N,list); } }
@aritralahiri8321
@aritralahiri8321 4 жыл бұрын
Your work is really great . No one has ever taught recursion in the same manner you are teaching .You are teaching us how to use a tool so that it can be used whenever necessary .I can say now that I really know recursion , I've solved this problem without looking into your solution . Really grateful for this hard work really appreciate your work bro . Thanks a lot .
@parthmittal5625
@parthmittal5625 3 жыл бұрын
Solved on my own!! Unmatched playlist! 🙇🏼‍♂️
@keshavbiyani9202
@keshavbiyani9202 5 ай бұрын
Another base condition could be if n0+n1 == n We won't have to reduce n Here's the python code """ For an input N, print the total number of n bit binary numbers for which, the number of 1's in all the prefixes is greater than or equal to number of 0's Example 1: Input: n = 2 Output: "11, 10" Explanation: Valid numbers are those where each prefix has more 1s than 0s: 11: all its prefixes (1 and 11) have more 1s than 0s. 10: all its prefixes (1 and 10) have more 1s than 0s. So, the output is "11, 10". Example 2: Input: n = 3 Output: "111, 110, 101" Explanation: Valid numbers are those where each prefix has more 1s than 0s. 111: all its prefixes (1, 11, and 111) have more 1s than 0s. 110: all its prefixes (1, 11, and 110) have more 1s than 0s. 101: all its prefixes (1, 10, and 101) have more 1s than 0s. So, the output is "111, 110, 101". """ from typing import List def getAllNBitBinaryNumbers(allNBitBinaryNumbers:List[str], n0:int, n1:int, op:str, N:int): if n0 + n1 == N: allNBitBinaryNumbers.append(op) return op1 = op + "1" getAllNBitBinaryNumbers(allNBitBinaryNumbers, n0, n1+1, op1, N) if n1 > n0: op2 = op + "0" getAllNBitBinaryNumbers(allNBitBinaryNumbers, n0+1, n1, op2, N) if __name__ == "__main__": n = int(input("Number of bits needed ins string ? ")) allNBitBinaryNumbers = [] n0 = 0 n1 = 0 op = "" getAllNBitBinaryNumbers(allNBitBinaryNumbers, n0, n1, op, n) print(allNBitBinaryNumbers) Please let me know if there are any suggestions on improvement :) Thanks for the teachings Aditya
@sohel-tamboli
@sohel-tamboli 4 жыл бұрын
Thank You So much bro for this playlist it is really improving my problem solving skills. Because of You, I am able to solve last parenthesis and this problem and other many problems without seeing Logic . Thank You So Much For great video series......
@ManinderSingh-xr6ir
@ManinderSingh-xr6ir Жыл бұрын
If you did previous question on your own, This question is a cake walk
@PriyanshuSingh-dt3oz
@PriyanshuSingh-dt3oz 2 жыл бұрын
you deserve 1 million subscribers.🙇🙇
@tushargarg3765
@tushargarg3765 2 жыл бұрын
# Running code n=3 def solution(ones,zeros,output,ans): if ones+zeros==n: print(output) ans.append(output) return if ones
@NitinKumar-pl3xl
@NitinKumar-pl3xl 4 жыл бұрын
Thanks Bro for doing this from your heart with one goal to help others. You are doing without any expectation from others. Follow this attitude/simplicity using pen and paper, definitely you will get what you want in life. The good thing is that you are not wasting time in basics(definition etc) the way or approach you are building to solve problem is awesome. Below list is considered as best material for Data Structure and Algorithm there is no comparison of your videos to this. Even your videos are very help full for experience ones also they have to also face first coding round. 1. Cracking the Coding Interview, 6th Edition :Gayle Laakmann McDowell 2. Introduction to Algorithms Third Edition : Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein 3. KZbin video : Abdul Bari If possible add English subtitles. After that you can see the difference in your video will reach to world wide. Subscribed your channel.
@RohitGupta-fv1ul
@RohitGupta-fv1ul 4 жыл бұрын
Eagerly Waiting for graph contents
@syedhabeebuddin101
@syedhabeebuddin101 2 жыл бұрын
Thanks a lot Dude !
@Vishal-ds6ly
@Vishal-ds6ly Жыл бұрын
thankyou very much sir for awesome playlist on recursion
@panavkumar9009
@panavkumar9009 2 жыл бұрын
I can't believe I was able to solve this problem on my own!!
@ayanjana2052
@ayanjana2052 2 жыл бұрын
Thanks for the awesome explanation
@dhirunand
@dhirunand 2 жыл бұрын
Watched video till 9:50 and coded it, love you brooooo 😍
@mohit84604
@mohit84604 Жыл бұрын
javascript code function main (p){ let n = p let zero = 0 let one = 0 let op = "" solve(n,one,zero,op) } function solve(n,one,zero,op){ if(n == 0){ console.log(op) return } if(one == zero){ let op1 = op + "1" solve(n - 1,one + 1,zero,op1) }else if(one > zero){ let op1 = op + "1" let op2 = op + "0" solve(n - 1,one + 1,zero,op1) solve(n - 1,one,zero + 1,op2) } } main(5)
@viggicodes
@viggicodes Жыл бұрын
def solve(zero, one, op, n): if zero+ one == n: print(op) return if one > zero: op1 = op + "0" solve(zero+1, one, op1,n) op2 = op + "1" solve(zero, one + 1, op2,n) return solve(0, 0, "", 3)
@aniketbhoite7168
@aniketbhoite7168 3 жыл бұрын
Thank you...we can literally solve these problems with nearly same functions...just little bit change n no need to see the video as well
@animeshbarole
@animeshbarole 2 жыл бұрын
Code with my Own ,Thnx Man
@laxmangurjar4776
@laxmangurjar4776 2 жыл бұрын
love the way you teach ❤
@sureshgadde5113
@sureshgadde5113 3 жыл бұрын
Thank you Bhai, for such a great explanation
@parvahuja7618
@parvahuja7618 4 ай бұрын
Thankyou so much sir
@harshthakur9890
@harshthakur9890 2 жыл бұрын
legend of algorithms.
@krishparmar7917
@krishparmar7917 Жыл бұрын
awesome video bro 💙💙. pr saath me time complexity bhi bta diya kr.
@gulshankumar9118
@gulshankumar9118 4 жыл бұрын
Koi bat nhi bhai jo ha wo bhi ek no. hai......
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
Thanks brother, making videos is easy, but dealing with these issues (hissing sound/low audio) is really a headache 😓😓Now I know how hard these other quality youtubers work.
@gulshankumar9118
@gulshankumar9118 4 жыл бұрын
@@TheAdityaVerma keep it up!! brother.......u will find a sol^n.....u could take help of other youtubers too.....
@arijitchandra8218
@arijitchandra8218 4 жыл бұрын
thank u for uploading videos like this
@thread1066
@thread1066 6 ай бұрын
python code : def gen(op,one,zero,n): if n==0: print(op) return if op=='': op = op + "1" gen(op,one+1,zero,n-1) elif one > zero: op2 = op +"1" gen(op2,one+1,zero,n-1) op1 = op + "0" gen(op1,one,zero+1,n-1) else: op = op + "1" gen(op,one-1,zero,n-1) op = '' n = 3 one = zero = 0 gen(op,one,zero,n)
@shyampramanik780
@shyampramanik780 4 жыл бұрын
Great content as always !!
@UCS_B_RishiRajTiwari
@UCS_B_RishiRajTiwari 2 жыл бұрын
Awesome Content... Now recursion has become cakewalk for me...
@ManishKumar-ux5un
@ManishKumar-ux5un 3 жыл бұрын
@Aditya sir you can use pointer mark so that we can see where you are pointing.
@indrakishorekumar6268
@indrakishorekumar6268 3 жыл бұрын
Java code ArrayList NBitBinary(int n) { // code here ArrayList res = new ArrayList(); int ones = 0; int zeros = 0; String op = ""; solve(ones, zeros, n, op,res); return res; } public void solve(int ones, int zeros, int n, String op, ArrayList res) { if (n == 0) { res.add(op); return; } String op1 = op; op1 += "1"; solve(ones + 1, zeros, n - 1, op1, res); if (ones > zeros) { String op2 = op; op2 += "0"; solve(ones, zeros + 1, n-1, op2, res); } return; } }
@AP-bk8vq
@AP-bk8vq 4 жыл бұрын
I was waiting for this🔥 Thanks sir and please try to upload videos on GRAPH!
@046_krishnarajchouhan9
@046_krishnarajchouhan9 4 жыл бұрын
Desh ki tarakki ke liye ye tumhara ye andaj bhot pasand aayaa bhai bhot hard...........thank you so much bhai.
@bhumikasharma5033
@bhumikasharma5033 3 жыл бұрын
Great explanation
@gokusaiyan1128
@gokusaiyan1128 2 жыл бұрын
# Print N-bit binary numbers having more 1’s than 0’s for any prefix res = [] def generate(output, ones, zeroes, n): if n == 0: res.append(output) return else: if ones == zeroes: generate(output + "1", ones+1, zeroes, n-1) elif ones > zeroes: generate(output + "1", ones+1, zeroes, n-1) generate(output + "0", ones, zeroes+1, n-1) n = 5 ones = 0 zeroes = 0 generate("", ones, zeroes, n) print(res)
@aryangautam7506
@aryangautam7506 Жыл бұрын
You are the best
@codewithsachendra7090
@codewithsachendra7090 4 жыл бұрын
Waiting for backtracking😍
@SaurabhSingh-ph2ry
@SaurabhSingh-ph2ry 3 жыл бұрын
But haven't got 🥲
@aryachaudhary1118
@aryachaudhary1118 3 жыл бұрын
``` int n; void bin(string s , int o , int z) { if(o+z==n) { cout
@randomthoughts3533
@randomthoughts3533 4 жыл бұрын
Hey Adi did it again thanx to you buddy
@gamerhu7462
@gamerhu7462 3 жыл бұрын
i did it myself yaass Yaar ye banda kitna awesome hai!!
@neymarjr-sc3oi
@neymarjr-sc3oi 3 жыл бұрын
JAVASCRIPT SOLUTION function subset(n,one,zero,arr){ if(n==0){ console.log(arr); return; } subset(n-1,one+1,zero,arr+'1'); if(one>zero){ var arr2=arr; var n2=n; subset(n2-1,one,zero+1,arr2+'0'); }; return; } var no=3; var o=0; var z=0; var ar=''; subset(no,o,z,ar);
@shantamshrestha2070
@shantamshrestha2070 4 жыл бұрын
Sir I think you missed questions on Longest Increasing Subsequence and it's variations in DP playlist. Those problems are tricky sometimes. Please discuss those as well
@ShivangiShree
@ShivangiShree 4 жыл бұрын
You are back❤
@satyabratabehera7526
@satyabratabehera7526 Жыл бұрын
i guess , i would have given right time to you before , there is no one who could have taught me recursion this better.
@shrishtysrivastava9282
@shrishtysrivastava9282 4 жыл бұрын
Best content 👍 Please make series on graph and hashing.
Josephus Problem | Game of Death in a circle | Execution in Circle
33:56
Generate all Balanced Parentheses
34:03
Aditya Verma
Рет қаралды 146 М.
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 35 МЛН
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1 МЛН
First Negative Number in every Window of Size K | Sliding Window
32:17
INDIA'S SMARTEST MATH TEACHER
18:43
Tanmay Bhat
Рет қаралды 1,5 МЛН
Characters, Symbols and the Unicode Miracle - Computerphile
9:37
Computerphile
Рет қаралды 2 МЛН
why are switch statements so HECKIN fast?
11:03
Low Level Learning
Рет қаралды 408 М.
Tower of Hanoi | Recursion
24:01
Aditya Verma
Рет қаралды 168 М.
AIR 1 Took his life !! 😔 | Every Student need to listen this - Alakh sir
11:13
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН