Hypothesis-Induction-Base Condition

  Рет қаралды 207,233

Aditya Verma

Aditya Verma

Күн бұрын

This is my first way to approach any recursive problem.
I explain the concept using a simple example:
Print 1 to n using recursion.
Pdf Notes Link: / 38570714
.CPP File Code: / 38570789 .
------------------------------------------------------------------------------------------
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.

Пікірлер: 240
@amitkumarsingh4379
@amitkumarsingh4379 4 жыл бұрын
in base condition you return 1 but return type of function is void?
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
oh ! Thanks for pointing it out, it should be cout
@omprakash007
@omprakash007 4 жыл бұрын
After such a long duration 😂
@sachin_bhandari8470
@sachin_bhandari8470 4 жыл бұрын
@@TheAdityaVerma problems like permutations of strings , permutations in alphabetical order
@sahilpahuja
@sahilpahuja 4 жыл бұрын
Also we are printing n so base condition should be n==0 return 1 or we can print n-1..
@samirsaurabh5785
@samirsaurabh5785 4 жыл бұрын
@@TheAdityaVerma please help us to solve print all index of a number using recursion .
@yashsarin7986
@yashsarin7986 4 жыл бұрын
Finally ! You're back . Please upload videos on GRAPH and BACKTRACKING .
@amaancodes
@amaancodes 3 жыл бұрын
"Foundation agar bekar hain, to upar kitna bada ghar bnalo, girega..." Thats damn true 💯
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 4 жыл бұрын
Thanks a lot for making us visualizing Recursion from a more interesting angle . Please include below videos for this topics : 1. Tower of Hanoi 2. Coin Change 3. Egg dropping 4. Generating all permutation 5. Rat in maze 6. N -Queen 7. Subset Sum Kind regards.
@trippinojas
@trippinojas 4 жыл бұрын
see dp playlist, some of your questions are there
@rahulmehra186
@rahulmehra186 3 жыл бұрын
Bro this is a million dollar course ...just keep doing it and we will support u
@ranajitmukherjee9789
@ranajitmukherjee9789 4 жыл бұрын
The best teacher is back
@svramanujan
@svramanujan Жыл бұрын
0:45 why making smaller input is popular? 1:30 flow 2:30 Approach in recursion 3:45 IBH Method (Theory) 6:00 IBH Method (Example)
@rishabhsahu3303
@rishabhsahu3303 4 жыл бұрын
next playlist for graph please..
@pandeysakshi6666
@pandeysakshi6666 3 жыл бұрын
Hey can you tell me from where you learnt backtracking and graph
@ajayfalcon6072
@ajayfalcon6072 2 жыл бұрын
yes, please tell us where you learnt backtracking and graph
@speedbreaker5642
@speedbreaker5642 4 жыл бұрын
Tree traversal will be good example if you explain in your recursion play list. Both BFS(level order) and DFS(pre, in or post order) for a tree. So, people will not have fear of traversing in a tree or a graph, because they will come to know how to use DFS or BFS for solving problems.
@letsoptimize4166
@letsoptimize4166 3 жыл бұрын
You are the best instructor for DS on YT.
@vaibhavgadag890
@vaibhavgadag890 4 жыл бұрын
I usually like vedioes rarely but,for this channel i found high worth to subscribe and share .Hats off to u sir i am in love with ur vedioes 🔥🔥💯
@sanidhyagupta1906
@sanidhyagupta1906 4 жыл бұрын
Bhaiya aap legend ho hamare liye...aapse acha utube pr koi padhata hi nhi.plz ese hi aur b topics pr video bana do plz . And love u bhaiya❤❤
@mohammedasifahmed426
@mohammedasifahmed426 3 жыл бұрын
Hi Aditya, Q) Print 1 to n asynchronously. Asked in Amazon technical round
@udayjordan4262
@udayjordan4262 3 жыл бұрын
#include using namespace std; void print(int n){ if(n==1){ cout
@mrityunjayjaiswal3801
@mrityunjayjaiswal3801 2 жыл бұрын
#include using namespace std; void print(int n){ if(n==0){ return ; } print(n-1); cout
@pratikpandey3903
@pratikpandey3903 Жыл бұрын
Hi @Aditya i think the if should be n
@abhirupdas719
@abhirupdas719 4 жыл бұрын
Hi Aditya, need a help with the below question. Samu is playing a shooting game in play station. There are two apples to aim in this shooting game. Hitting the first apple will provide her X points and hitting the second apple will provide her Y points. And if she misses the apple she chose to hit, she won’t get any point. Now she is having N coins and each shoot will cost her 1 coin and she needs to score at least W points to win the game. Samu don't like to lose at any cost. At each turn, she has two choices. The choices include: - Hitting first apple with probability P1 percent. However, she might miss it with probability (1-P1) percentage. Hitting second apple with probability P2 percent. However, she might miss it with probability (1-P2) percentage. She would like to know what is the maximal expected probability (as a percentage b/w 0 and 100) of winning the shooting game. Note: Choosing to hit any apple is entirely her choice. Both are independent events meaning P1 + P2 may/may not exceed 100. Output must contain 6 digits after decimal.
@deepakprasad2566
@deepakprasad2566 4 жыл бұрын
he is back. thanxs a lot.
@KaranSharma-ew7io
@KaranSharma-ew7io 4 жыл бұрын
Finally the wait is over , Aditya is back
@yoyo8293
@yoyo8293 4 жыл бұрын
Hi bro,if possible make a video on this Question : - We are given a hashmap which maps all the letters with number. Given 1 is mapped with A, 2 is mapped with B…..26 is mapped with Z. Given a number, you have to print all the possible strings. Input Format A single line contains a number. Constraints Number is less than 10^6 Output Format Print all the possible strings in sorted order in different lines. Sample Input 123 Sample Output ABC AW LC Explanation '1' '2' '3' = ABC '1' '23' = AW '12' '3' = LC
@aayush3883
@aayush3883 4 жыл бұрын
Good question ... From coding blocks
@111rhishishranjan2
@111rhishishranjan2 2 жыл бұрын
Patreon page is asking $3 doller bhiya for notes .Bhaiya we can see ads for notes , pls see toward it , after Job we can pay $3 but its too much for students.
@gurupreetsingh8347
@gurupreetsingh8347 4 жыл бұрын
bhai @aditya yeh fourth method kaun sa hai , maine toh puri recursion videos dekh li, aap ne batya nhai may be,,, right ??
@Abhisheky418
@Abhisheky418 4 жыл бұрын
bhai m so glad u r back😎
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
Yup back with a bang !! 😎😅😅
@Abhisheky418
@Abhisheky418 4 жыл бұрын
u are saviour for many like me. Thankyou for putting all the efforts the way u teach feels like my elder brother is teaching me. Thankyou for everything 🥰
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
❤️❤️
@polyakter5435
@polyakter5435 4 жыл бұрын
You class is so nice.And love from Bangladesh
@siddhantprakash.
@siddhantprakash. Жыл бұрын
Very good explanation. I've made this even simpler in my channel (recursion revision playlist). using expectation faith method.
@mutyaluamballa
@mutyaluamballa 3 жыл бұрын
you know what, I usually click like for your videos, before the video starts playing.. cheers
@ajaymahar5538
@ajaymahar5538 4 жыл бұрын
Hi Aditya, Nice one, I tried to find the explanation for using recursion for linked list, i think if you could consider to include solving linked list problems using recursion would make this playlist more dynamic. Thanks for all your efforts.
@TaniyaGuptaaa
@TaniyaGuptaaa 4 жыл бұрын
Please solve this question : Given an array of integers. Find the size of the smallest subset with maximum Bitwise OR . Was asked in Google Coding Round
@mohitshoww
@mohitshoww 4 жыл бұрын
Bhai Itni Jaldi Jaldi Back 2 Back ... 😂
@ankoor
@ankoor 4 жыл бұрын
1 to N Python Code: def display(n): if n == 0: # Largest invalid i/p return display(n-1) print(n) display(5) C++ Code #include using namespace std; void display(int n){ if (n == 0){ // Largest invalid i/p return; } display(n-1); cout
@sidwar
@sidwar 4 жыл бұрын
thanks bro
@MayankKumar-nn9sy
@MayankKumar-nn9sy 4 жыл бұрын
Java me bta do koi
@pine6568
@pine6568 4 жыл бұрын
@@MayankKumar-nn9sy JAVA CODE: class main{ public static void main(String[]args){ print(7); } private void print(int n){ if(n==0){ return ; } print(n-1); System.out.print(n+" "); } }
@pine6568
@pine6568 4 жыл бұрын
print method should be static sorry for the mistake:(
@sahilmathur7371
@sahilmathur7371 3 жыл бұрын
@@pine6568 Can you tell me how it will print values of n ?
@abhishekchatterjee3750
@abhishekchatterjee3750 3 жыл бұрын
It's really strange that how could this channel is having 61.k subscribers when channels full of shit with videos of PUBG is having millions ! The situation should be other way around. You are awesome bro.
@ananysharma9290
@ananysharma9290 4 жыл бұрын
Sir , Loved these Videos , Please Upload Graphs Sir❤️❤️
@dsa9980
@dsa9980 4 жыл бұрын
Jiyo yarr.. adbhut videos..!!
@shivangishukla2629
@shivangishukla2629 4 жыл бұрын
"generating permutations of string with duplicate letters" is one question that me n my friends find hard to understand. if you can please explain this and its code.
@ishitajhunjhunwala3838
@ishitajhunjhunwala3838 4 жыл бұрын
Count and say sequence - good question which can be solved using recursion
@kapilsahu4001
@kapilsahu4001 10 ай бұрын
I listen the music in starting at least 3 times in each video.....#accha_lagta_hai
@pranaydwivedi5025
@pranaydwivedi5025 4 жыл бұрын
Question 1 Printing all subsequences of an array. Question 2 Combinations in a String of Digits(Geeks for Geeks)
@deyp11
@deyp11 4 жыл бұрын
Hi...bahut hi shi ..jhakkas ..jitni taarif kro km hai ..kamaal ho aap ..a lot of thanks to you
@Mind_Mechanics_
@Mind_Mechanics_ 2 жыл бұрын
Hi Aditya, I really enjoyed watching your video on this topic. It was very informative and helpful. I have a suggestion that I think could make the video even more valuable to your viewers. Would you consider including some practice questions in the description of the video? This could be a great way for viewers to test their understanding of the material and reinforce their learning. It could also be helpful for those who are studying for a test or exam and want to see how well they can apply their knowledge. I think this would add an interactive and engaging element to the video, and I believe it would be beneficial for your viewers. Thanks for considering my suggestion! Best regards,MR_King_KK
@bournvitaoverchai
@bournvitaoverchai 4 жыл бұрын
Does anyone know what is the name of the tool / software that Aditya uses here while writing and explaining ?
@babbarutkarsh7770
@babbarutkarsh7770 4 жыл бұрын
Bhaiya ne direct ek baar me bombing kardi videos ki
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
💣💣💣
@ankitdubey268
@ankitdubey268 4 жыл бұрын
Bro pls teach with stack frame and moving of control from one statement to other..waise samjhne me Jada easy hoga ek baar foundation bn jaye to acha rhega
@56_neeleshkumar68
@56_neeleshkumar68 4 жыл бұрын
Sir please number your lectures... Keep going loving your lectures..
@girdharipatel2
@girdharipatel2 2 жыл бұрын
thanks for this lecture please make video on merge sort
@sagnikroy2
@sagnikroy2 4 жыл бұрын
Sahi H....Pehle kitna deep soch leta tha and got confused....now all clear.
@tsupreetsingh
@tsupreetsingh 4 жыл бұрын
Bhai Graphs par bhi bano do ek playlist , bohot help hoga !! 🙏🙏
@jhashivam28
@jhashivam28 4 жыл бұрын
Hero is back and that to fully upgraded
@AmitKumar-kx5nw
@AmitKumar-kx5nw 3 жыл бұрын
Java Code For Printing 1 to N using Recursion public class Print1toN { public static void printN(int n) { if(n==0) { return; } printN(n-1); System.out.print(n+" "); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int r=sc.nextInt(); printN(r); } }
@neerajpandey8159
@neerajpandey8159 4 жыл бұрын
bhaiya u should add these questions also in playlist 1.string to integer using recursion 2. remove occurence with pi
@velociraptor_ap6733
@velociraptor_ap6733 4 жыл бұрын
Hi.. I'm a bit new to both the concepts of Recursion and DP..So what playlist of yours should I start first.? Recursion or DP..?To clearly understand both the topics..
@narolavarshil6067
@narolavarshil6067 3 жыл бұрын
recursion
@abbas__00
@abbas__00 Жыл бұрын
Hello Aditya sir , please include the questions.....N - queen , sudoku solver , rat in maze and Kth permutation.
@oqant0424
@oqant0424 2 жыл бұрын
Lecture 3 done✅
@sm6214
@sm6214 4 жыл бұрын
Please upload a series on advanced data structures like tries, segment trees, red-black trees, splay trees, consistent hashing, advanced graph algos. And i recommend you to upload your DP playlist as a course on udemy by refactoring it a bit, that content on dp is really not available ans it took me decades to reach to the right person
@roshan84ya99
@roshan84ya99 4 жыл бұрын
S="aabb" T="ab" Total number of time we remove t from s Like for this case we remove t 2 times from s First time "a ab b" Middle one removed then we have "ab" Pta ni recursion se hoga ya nahi pr ye question aaj phansa tha 😅
@vipinsahu1306
@vipinsahu1306 11 ай бұрын
Foundation is important for strong and large building
@amulop
@amulop Ай бұрын
Completed 09/01/2025 23:18 PM
@pranjalgupta9427
@pranjalgupta9427 4 жыл бұрын
Nice bro 👍👏😊
@KishanGupta-qe2yk
@KishanGupta-qe2yk 3 ай бұрын
Plz plz tell me Isee padhne ke liye hame java language aana chahiye ya c++ kisme padhaye hai ye dsa series plz tell
@premashishghosh7470
@premashishghosh7470 2 жыл бұрын
Sir I was trying to do nth Fibonacci number using induction base hypothesis but I am unable to solve that. Please tell me how can I solve that using induction base hypothesis
@sandeepgmore1483
@sandeepgmore1483 Жыл бұрын
@Aditya Verma Don't say thanks for watching.. Let us say thanks for teaching☺
@bharanidharan.m4245
@bharanidharan.m4245 Жыл бұрын
how to find or choose a method to solve a problem among the both IBH method/ ip-op method ?
@FUZAILAHAMADSHAIK
@FUZAILAHAMADSHAIK Жыл бұрын
when you say 'agar aap log DP padke aaye hp'. does it mean that we can directly approach without learning recursion and greedy topics or so.
@kollivenkatamadhukar5059
@kollivenkatamadhukar5059 4 жыл бұрын
God of DS and Algo
@LifeDude
@LifeDude 4 жыл бұрын
Thank you
@pratheeksha616
@pratheeksha616 4 жыл бұрын
please create a playlist on graphs
@rayansailani4465
@rayansailani4465 3 жыл бұрын
Looks like the recursive tree approach works better with decision making (decision space) related problems..
@harshitkumar7831
@harshitkumar7831 4 жыл бұрын
sir,At 12:49 print function return type is void ...how it will return 1.?
@shivammodanwal9058
@shivammodanwal9058 3 жыл бұрын
here we can see how to learn easy topics in a hard way
@imsrvstv
@imsrvstv 4 жыл бұрын
Sir, what did you meant by reversing a linked list in O(1)? Did you meant time complexity or space complexity? Also if you meant time complexity then how to do so!
@sayandutta5500
@sayandutta5500 4 жыл бұрын
I guess he's talking about space complexity. Because reversing a LL with recursion will require O(n) time.
@imsrvstv
@imsrvstv 4 жыл бұрын
@@sayandutta5500 yeah you might be right
@maitohpughu5714
@maitohpughu5714 3 жыл бұрын
Sir agar apke code se aye toh sirf 2 to N print hoga. This code printed 1 to N. def oneToN(n): if n==0: return oneToN(n-1) print(n, end= " ") oneToN(7)
@arpitverma8060
@arpitverma8060 4 жыл бұрын
next series graph plz 🙏,iska bhi koi acha content available nhi h
@sanwalia8766
@sanwalia8766 4 жыл бұрын
code n code ki graph theory waali playlist achhi hain, maine padha hain usse, achhaa padata hain
@rakeshreddy6630
@rakeshreddy6630 3 жыл бұрын
what about def recursive( i ) : if i > 0 : recursive( i - 1 ) print( i ) recursive( 4 ) o/p: it will print from 0 to 4 ->my doubt is after reaching to 0 it will print 0 but how can it print from 1 to 4 without returning -> some times we use return sometimes don't when can be sure when to use return?
@chiragchoudhary8876
@chiragchoudhary8876 4 жыл бұрын
Sir can you please make a series on graph......
@MANNEPALLIPOOJITHE
@MANNEPALLIPOOJITHE Жыл бұрын
bro ho to know for which proble we can use IBH
@sayantaniguha8519
@sayantaniguha8519 3 жыл бұрын
6:13 Binary Tree to DLL Binary Tree from INorder& Preorder
@yashkumawat1131
@yashkumawat1131 4 жыл бұрын
next series on graph please
@GauravSingh-ox2jz
@GauravSingh-ox2jz Жыл бұрын
sir please make a playlist for linked list
@kamakshitrivedi8561
@kamakshitrivedi8561 4 жыл бұрын
Please also explain that how compiler will interpret such problems..
@tanmaykumar4784
@tanmaykumar4784 4 жыл бұрын
pen paper wala better feeling deta tha
@sharathkumar8338
@sharathkumar8338 4 жыл бұрын
is it free ? Pdf notes and .CPP file code?
@amitkumarsingh5414
@amitkumarsingh5414 4 жыл бұрын
Bhai wapas aa gya, :) thokko like and subscribe :p
@viggicodes
@viggicodes Жыл бұрын
def for_loop(n): if(n == 0): return for_loop(n-1) print(n) for_loop(7) I think base case should be 0. current code in video is not printing 1
@PANKAJ_SINGH1104
@PANKAJ_SINGH1104 3 жыл бұрын
Ab apki koe playlist nhi a rhi h !! Kisi topic pe upload kriye
@debam_garai
@debam_garai 3 жыл бұрын
please make video on the following problem : "Given a value of N, print all the binary strings of size N which have no consecutive 1s"
@gautamjain6275
@gautamjain6275 3 жыл бұрын
why you are not making videos now a days
@lamishajoshi7480
@lamishajoshi7480 Жыл бұрын
Sir, in printing numbers 1 to n , base condition should be n
@abhishekchatterjee3750
@abhishekchatterjee3750 3 жыл бұрын
Hi Aditya, Will it be possible for you to make a video on minimize height difference in tower problem. I am just starting please dont mind for asking this simple problem.
@payalgupta991
@payalgupta991 4 жыл бұрын
please upload a video on permutation of strings and tower of hanoi
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
Permutation of string is actually backtracking, TOH can be included.
@shashankmittal8820
@shashankmittal8820 4 жыл бұрын
Can you please tell which tools and Softwares you use for these video creations? I have never seen such a great explanation with such audio clarity and the use of digital whiteboards.
@ysabhishekmishra
@ysabhishekmishra Жыл бұрын
For 1--> n #include using namespace std; int recursion(int i,int n){ if(i==n){ return n; } cout
@afrozahmad6862
@afrozahmad6862 4 жыл бұрын
bro make a video on combination sum problem of leetcode ...its quite a hard problem to solve
@shashankkumar6385
@shashankkumar6385 4 жыл бұрын
Could you do a set of tree questions using recursion?
@utkarshmishra4947
@utkarshmishra4947 4 жыл бұрын
Nice
@madhabkafle8898
@madhabkafle8898 2 жыл бұрын
DP parhke recursion kon parhne ayega bhaiyya 😁😁
@snehagoel6548
@snehagoel6548 3 жыл бұрын
Deletion in a BST
@pragatiagrawal201
@pragatiagrawal201 2 жыл бұрын
Please please please please take this question -> Interleaving strings My whole day has gone in it still I am unable to solve it.. If you can find some time then please take it. And, thanks a lot for this playlist
@saniakouser3832
@saniakouser3832 5 ай бұрын
cheers to those jo dp padhkr recusrion padhnei aaye hain
@arvindchez
@arvindchez 4 жыл бұрын
Bro can you include - String chain problem? Thanks ✌️
@STR09
@STR09 4 жыл бұрын
i m not getting the solution pls help
@RaviKumar-oy9nn
@RaviKumar-oy9nn 3 жыл бұрын
how could i get the code? charging$3🤦‍♂️
@abhijeet007suman5
@abhijeet007suman5 3 жыл бұрын
pay!!
@samqureshi9415
@samqureshi9415 2 жыл бұрын
Bhai tu zinda hai na ??? Bhoat log bolte aditiya Verma video q dalna band kar diya itna mast padata hai wo . Aab video nahi aari toh dought hora zinda hai k nahi.
Beauty of Hypothesis And Induction
6:42
Aditya Verma
Рет қаралды 138 М.
Sort An array using Recursion
31:57
Aditya Verma
Рет қаралды 242 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Generate all Balanced Parentheses
34:03
Aditya Verma
Рет қаралды 154 М.
How to Stop Procrastinating and Finally Take Action
16:31
Ali Abdaal
Рет қаралды 153 М.
Tower of Hanoi | Recursion
24:01
Aditya Verma
Рет қаралды 177 М.
Discrete Math II - 5.2.1 Proof by Strong Induction
16:22
Kimberly Brehm
Рет қаралды 112 М.
Recursion Introduction and Identification
32:31
Aditya Verma
Рет қаралды 636 М.
these are the habits of the top 1% students, that you can do.
12:58
Kth Symbol in Grammar
23:32
Aditya Verma
Рет қаралды 128 М.
Recurrence Relation Proof By Induction
7:42
randerson112358
Рет қаралды 78 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН