Тёмный

Recursion in One Shot | Theory + Question Practice + Code | Level 1 - Easy 

Apna College
Подписаться 6 млн
Просмотров 1,3 млн
50% 1

Link to the Notes of Class: drive.google.c...
Complete C++ Placement Course (Data Structures+Algorithm) : • C++ Full Course | C++...
Telegram: t.me/apnikaksh...
Instagram: / dhattarwalaman
My RU-vid Gear 😉: docs.google.co...

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

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 814   
@mdsarfarazalam8452
@mdsarfarazalam8452 2 года назад
Fibonacci series: 47:56 Power calculation : 1:00:13 Power calculation in optimized way : 1:12:00 ( log n) its code is : 1:22:40
@Shubh.Shorts.
@Shubh.Shorts. 2 года назад
ru-vid.com/group/PLu0W_9lII9agS67Uits0UnJyrYiXhDS6q
@JERRY-vw3op
@JERRY-vw3op Год назад
Vaiii 46:56
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@kenyelite8574
@kenyelite8574 10 месяцев назад
Thnx buddy
@onkarvyavahare3327
@onkarvyavahare3327 3 года назад
Stack height concept you have tought was nothing anywhere generally...so thank you for such intuition.
@xdnaitiksaraf1474
@xdnaitiksaraf1474 2 года назад
at 30:30 public static int sum(int n){ if (n==0) { return 0; } return n+sum(n-1); } is more convinient
@jashanbhamra103
@jashanbhamra103 2 месяца назад
yuo maine bhi esai kia
@minivishwakarma960
@minivishwakarma960 Год назад
You guys are creating such a valuable content and providing it for free, also motivating us to be better in our fields, hats off to Aman and Shraddha.
@pavanmadagani7725
@pavanmadagani7725 Год назад
VARANASI SARALA PUUKU MUNDADHI
@vloglive
@vloglive Год назад
Very valuable feedback for them
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@adityaagarwal2324
@adityaagarwal2324 3 года назад
Didi, backtracking ke upar bhi dedicated playlist banaiye please
@lokendrasingh9780
@lokendrasingh9780 3 года назад
we want marathon on backtracking 🔥🔥🥰🥰
@adityadixit7973
@adityadixit7973 3 года назад
Yes
@adityadixit7973
@adityadixit7973 3 года назад
Need a complete course on java like the c++ complete series
@prshark84
@prshark84 3 года назад
Which college
@adityaagarwal2324
@adityaagarwal2324 3 года назад
@@prshark84 apna college
@onlythereal333
@onlythereal333 2 года назад
Really great tutorial i really stuck in recursion but when you teach with very basic questions i really understood it well with what happens in background coding how recursion works 👍☺️☺️👏🙌
@_AAMIR_.AEP.
@_AAMIR_.AEP. 2 месяца назад
Are you completing your college 😊
@iqbalhossain927
@iqbalhossain927 2 года назад
Need this type of practice question in every topic. Hope you continue like this. And thanks for this awesome session😍
@faisalkhan1026
@faisalkhan1026 2 года назад
This is hands down the most comprehensive lecture for me ! Thank you for making such a high quality, lucid and brilliant explanation video on RECURSION, Your channel is Subscribed right away !
@uskapyaar8852
@uskapyaar8852 2 года назад
Thank god you said that... I had my hands up this whole time :(
@lalalostyou6858
@lalalostyou6858 Год назад
@@uskapyaar8852 😂😂😂😂
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@chargeff06
@chargeff06 Месяц назад
1:24:04 below code works perfectly fine for both even and odd number, no need of using if else condition(if I'm wrong then run this code without condition) public static int optimisedFunc(int n, int power){ if(power == 1) return 1; return (n * optimisedFunc(n, power/2) * optimisedFunc(n, power/2)); }
@JAGMEETHEBEST
@JAGMEETHEBEST 3 года назад
"JEE PREP HO YA COLLEGE KI PADHAI, ONE SHOTS ARE THE BEST!!"😂😂👌
@just.indianstuff7537
@just.indianstuff7537 3 года назад
How it's taking n as power ?? Like there is math.pow to that we can use power how this happen here??
@abdulroufshaik123
@abdulroufshaik123 2 года назад
😂😂
@pranjalbiswas6585
@pranjalbiswas6585 2 года назад
Wah wah wah wah
@sayannitdgp8957
@sayannitdgp8957 2 года назад
😂😂😂😂
@mehakarora3977
@mehakarora3977 Год назад
@@just.indianstuff7537 yeah I also didn't understand this .how this is possible??
@nandk45523
@nandk45523 3 года назад
Aman bhaiya c++ pe practice 500 questions Ki serie banvado please 🙏🙏🙏 garib ko placement lag jayegi
@KaranKumar-vm2we
@KaranKumar-vm2we 3 года назад
Babbar's 450 ques is best for placements👍
@nandk45523
@nandk45523 3 года назад
@@KaranKumar-vm2we Haan vahi solution bi chayie😅
@nandk45523
@nandk45523 3 года назад
@@KaranKumar-vm2we oh no oh no oh no no no..!
@The_Mitnick
@The_Mitnick Год назад
Abe kisi ke bhi DSA sheet utha kar kar le uske baad kitne bhi solve karte beth
@lokadeepak7880
@lokadeepak7880 10 месяцев назад
​@@KaranKumar-vm2weBhai Java ke liye questions kaha milega...
@moremansi81
@moremansi81 4 месяца назад
For sum of n natural numbers, i guess correct way with recursion is.. public class Recursion { public static int printSum(int n) { if(n==1) { return 1; } return n + printSum(n-1); } public static void main(String[] args) { int n = printSum(5); System.out.println(n); } }
@paragshende3390
@paragshende3390 4 месяца назад
what happens when we do return 1; ?
@moremansi81
@moremansi81 4 месяца назад
@@paragshende3390 when there is a function call (new stack frame) with n==1 then 1 is returned back to stack frame from where this call is made
@kishordhobale6317
@kishordhobale6317 2 месяца назад
this is simple way to calculate sum of n number which you explained.good job
@uditnagar7905
@uditnagar7905 Месяц назад
Yes you are right. I also did the same
@rajivtripathi8403
@rajivtripathi8403 3 года назад
Great Great great Job!!!!. Actually Recursion is the toughest logic to implement and the way you teach specially coding in which u need to develop the thought process along with the problems.....you did it so well.....and in very simple way...... I have seen lot of videos on you tube but it is the BEST ONE !!!!great Contribution to community!!! Keep up the good work!!!!
@ayushnegi675
@ayushnegi675 Год назад
i can't explain how easily i was able to understand recursion in this video with time complexity, thanks a lot to you ma'am
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@prathambharti2462
@prathambharti2462 3 года назад
I didn't know Java language but still learning this video because C++ playlist has good content but not for beginainers But it is need more video like this on ds algo
@abhinitashrivastava9100
@abhinitashrivastava9100 2 года назад
You are amazing! I am a 52 years old but i understand the concepts very well because of you. Thanks!
@i.khushii
@i.khushii Год назад
52 ? And learning java ..? I mean for what ? 😅
@annielouise1141
@annielouise1141 Год назад
@@i.khushii maybe because the institute asked her to my oops teacher was in same position
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@Veds5861
@Veds5861 2 года назад
just use ternary operator n == 1 || n == 0 ? return 1 : n * factorial(n-1) ; 2 lines of code in just one line using ternary Thanks mam to make recursion easy to understand
@gulshanbindua7471
@gulshanbindua7471 3 года назад
Without 3 variable, you can also use
@nocturnal_wanderer
@nocturnal_wanderer 3 года назад
In the last problem, in the even part, it should be if(n==1) return x; Otherwise coz of the n==0 we get x^0=1 then x^1 will be equal to 1 and so on...
@abhi.1289
@abhi.1289 Год назад
Best explanation ever.. Finally i understand recursion... 🥳🥳🥳🥳
@raunakkumarmishra1449
@raunakkumarmishra1449 3 года назад
This is something we can call Recursion Thanku Di and thanku Aman bhaiya to bring such people for us❤🔥
@siddhantpatel01
@siddhantpatel01 3 года назад
Thank you so much all team members of aman bhiya aman bhiya you are doing really really really great work . when i wached apna college then i feel I'm graduating form Apna college institute of engineering and technology
@sauravjha2933
@sauravjha2933 3 года назад
This is the best video on recursion. Thank you so much.
@ArjunSharma-gp6hy
@ArjunSharma-gp6hy 3 года назад
Yes we need a dedicated playlist on backtracking topic 👍
@ArjunSharma-gp6hy
@ArjunSharma-gp6hy 3 года назад
@masskie star this video is not available, but why?🙄
@sambitbhakat7021
@sambitbhakat7021 Месяц назад
1:21:32 here when alpha is 4 then hight of stack is 3 not equal to alpha
@haidertest1809
@haidertest1809 2 года назад
Another method for factorial using Recursion; static void fnc2(int n, int sum){ if(n == 0){ // BASE CASE System.out.println(sum); return; } sum *= n; // ACTION fnc2((n-1), sum); // sum will not change for each recursive step }
@sandeshvora
@sandeshvora 3 года назад
In last and second last problem we can change first base case to... If(n==1) return x;... So that no of levels and value of n remains same...
@komalkamani5892
@komalkamani5892 3 года назад
Please make whole series JAVA DS+ALGO 🥳
@mukulchopra3378
@mukulchopra3378 3 года назад
khush to bhut hoge ab tum
@ji6442
@ji6442 2 года назад
Didi aapka contents PHYSICS WALLAH ke tarah hai...... High quality content of explaining, thank you didi....
@uskapyaar8852
@uskapyaar8852 2 года назад
I think if we take base condition in question of x^n (stack height = n) as if n = 1 return x; then we can achieve exact stack height of (n)
@mainak23_12
@mainak23_12 3 года назад
Didi please🤓 kindly make a 💢complete "Java Programming+DSA" course😎,I am not able to understand the C++ course, please it's an humble request 🙏
@lalitvats9803
@lalitvats9803 2 года назад
I am in Coding Ninja Coding boot camp, but they teach like, only doing there job. For understand the fundamentals and concepts, I always prefer Apn college. Very Easy explanation ❤❤❤
@te-a-64-vivekyadav87
@te-a-64-vivekyadav87 Год назад
public static int printSum(int n){ if(n ==0){ return 0; } else{ return n+ printSum(n-1); } public static void main(String args [ ] ){ int n =5; int ans = printSum(n); syso(ans); } An easy and better code for printing sum of n numbers using recursion
@salahiansofficial424
@salahiansofficial424 3 года назад
Please make a series of java, we would be really thankful to you cause the way you are explaining things it's just too easy to get you.
@mrbob2148
@mrbob2148 3 года назад
++
@Shubh.Shorts.
@Shubh.Shorts. 2 года назад
@@mrbob2148ru-vid.com/group/PLu0W_9lII9agS67Uits0UnJyrYiXhDS6q
@ahmadrasheed2598
@ahmadrasheed2598 Год назад
I usually don't comment on videos but I have to say the explanation is mind-blowing I cannot thank you in words🥰
@arshadimam3420
@arshadimam3420 2 года назад
Probabily the best teacher in the world for computer science student.
@RAIZAKHALID-xx1jw
@RAIZAKHALID-xx1jw 2 месяца назад
*probably
@nilavabishnu
@nilavabishnu 2 года назад
for the question : print x^n (!st one)...how is the power happing in calcpower(x,n-1)....is it being used as math.pow?
@mehakarora3977
@mehakarora3977 Год назад
Ma'am plz explain this:-- humne to math. Pow use nhi kiya to calcpower kese output dera hai??
@venkateshjacke7238
@venkateshjacke7238 8 месяцев назад
Hi shardha in function calpower we dont require to chk the condition for x since we are not editing it also the height of the stck can be reduced by adding a basecase of if(n==1) return x; so the height will be n-2 here pls correct if anything wrong Thankyou
@akashmondal3952
@akashmondal3952 6 месяцев назад
31:06 instead of sum+=i we can do (i==n+1) and then print sum then return.
@vishvjeet1551
@vishvjeet1551 9 месяцев назад
factorial vala question sum of n natural numbers se bhi ho jayega bus sum=1 kardo and + ki jgeh * kardo
@kishordhobale6317
@kishordhobale6317 2 месяца назад
for find factorial we can use return n * fact(n-1) base condition if(n == 0) return 1 ; this is simple way to print factorial
@dhruvjoshi4192
@dhruvjoshi4192 3 года назад
Thank youu dii..bas aise hi continue rkhna ab please 🥺❤️
@vishnureddy5060
@vishnureddy5060 3 года назад
Hello sister we need more videos like this java.... Thank you for your previous videos
@khushigupta2206
@khushigupta2206 Год назад
You have explained one of the complex topic in a very smooth way. Very Thankful🥰
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@technicalspider2547
@technicalspider2547 3 года назад
Slowly aur easily padhaya hai awesome 😀
@mrlalit0552
@mrlalit0552 3 года назад
Thank you so much, mam it's too good 👍 learning 📕 platform
@collegeWale.insane
@collegeWale.insane 2 года назад
Bhagwan apka bhala kre... recursion ko detail se smjhane ke liye apka bahut bahut dhanyawad..
@techgamertej2811
@techgamertej2811 7 месяцев назад
thoda mushkil hai
@prankitsharma
@prankitsharma 4 месяца назад
🥺🥺🥺🥺🥺
@cp65143
@cp65143 4 месяца назад
🐭🐭🐭🐭🐭
@mridulsd2023
@mridulsd2023 4 месяца назад
Sidha recursion padhoge toh lagega hi Step by step basic se karo warna karo mat
@LETSLEARNASKILLANDGETLIFE
@LETSLEARNASKILLANDGETLIFE 3 месяца назад
Same
@royalX555
@royalX555 2 месяца назад
​@@mridulsd2023ye depend krta h Me is sal hi college jaunga to thoda mushkil lag rha h mene Kiya h basic se pura fir bhi 😢
@chinmayajena9318
@chinmayajena9318 2 года назад
Last question is so dengerious..Didi🙂dimag nehni chalapaya us type ke question par...but rest of the question are easy to catch...thanks for sharing this type of difficulty label class...❤❤❤
@gaurigupta5129
@gaurigupta5129 2 года назад
Great explanation! Best lecture of recursion on you tube.
@pavanmadagani7725
@pavanmadagani7725 Год назад
VARANASI SARALA PUUKU MUNDADHI
@aeztf
@aeztf 2 дня назад
Another method to find factorial(similar to sum of n numbers.) public class fact { public static void factNumber(int n, int fact){ if (n == 0) { fact *= (n+1); System.out.println(fact); return; } fact *= n; factNumber(n-1, fact); } public static void main(String[] args){ factNumber(5, 1); } }
@YawarAbass
@YawarAbass 3 года назад
Waiting for this video from lot of time. Thanks 🤗
@BAzma-jp3mn
@BAzma-jp3mn 5 месяцев назад
ma'am can we print the numbers from 1 to 5 by using this code public class recursion1 { public static void printNum(int n) { if(n==0){ return; } printNum(n-1); System.out.println(n); return; } public static void main(String[] args) { int n=5; printNum(n); } }
@Yuvika116
@Yuvika116 5 месяцев назад
Yes
@manalitawar5327
@manalitawar5327 Год назад
Hi Shraddha, I think the time complexity for the last question to calculate x^n is O(n) instead of O(logn) beacuse we are calling calcPower twice in the return statement. If we store the value of calcPower after calling it once in temporary variable and multiple with itself and return this will help in the time complexity reduce to O(logn).
@pavanmadagani7725
@pavanmadagani7725 Год назад
VARANASI SARALA PUUKU MUNDADHI
@kakshabaravijeeneet
@kakshabaravijeeneet 3 года назад
Bestest Video On Recursion ❤
@VijayJain-ls9du
@VijayJain-ls9du Год назад
You are Best Teacher Ever..main to aapka all time wala Fan ho gaya...now Recursion is Clear...
@Gamer_0057
@Gamer_0057 2 года назад
53:57 We can also do this if we dont want to do anything in the main class - public class fibonacci { public static void main(String[] args) { int z = 5; int a = 0; int b = 1; int c = 0; calcFibonacci(a, b, c, z); } public static void calcFibonacci(int a,int b,int c,int z){ if(z==0){ return; } c = a+b; System.out.print(a); System.out.print(b); System.out.print(c); a = b+c; b = c+a; calcFibonacci(a, b, c, --z); } }
@SIR.abinash
@SIR.abinash 2 года назад
Han but jyada lagega though yhan ye itna jyada nhai hai but take a big no. For consideration.
@be_rajeevkumar
@be_rajeevkumar Год назад
Kitna aacha samjaya h apne didi. Thankyou so much to making a good start in recursion.
@devansh_4u
@devansh_4u Год назад
In x^n question can we do it this way: public class recursionOne { public static void pow(int pro, int x, int n) { if (n==0) { System.out.println(pro); return; } pro*=x; pow(pro, x, n-1); } public static void main(String[] args) { pow(1, 1, 0); } }
@pranavchaudhari3268
@pranavchaudhari3268 Месяц назад
Another way to print factorial public static void printFactorial(int n,int f){ if(n == 1){ System.out.println(f); return ; } f *= n; printFactorial(n-1,f); } public static void main(String[] args) { printFactorial(5,1); }
@Hiten_268
@Hiten_268 2 месяца назад
Le bhai terko dsa asaan laag rha tha nah 😢 abb bol😂
@The_TechX
@The_TechX Год назад
I didn't understand the last problem, how it works...
@trending9120
@trending9120 3 года назад
Didi please make complete java series Your teaching style is amazing
@rickiodious
@rickiodious 2 года назад
This is a part of the complete java series...
@pavanmadagani7725
@pavanmadagani7725 Год назад
VARANASI SARALA PUUKU MUNDADHI
@VaibhavKKM
@VaibhavKKM 2 года назад
Easiest code for Sum of n Natural No:- class jjsr{ public static int sum(int n){ if(n==0){ return 0; } return n + sum(n-1); } public static void main(String[] args) { int n=10; System.out.println(sum(n)); } }
@lakshitjangid3096
@lakshitjangid3096 3 года назад
Please make the Python Course with DSA just like the C++ course. It will be very helpful 🤞
@atharvak1503
@atharvak1503 3 года назад
I also want python course with DSA
@harshalbadgujar944
@harshalbadgujar944 3 года назад
Yes absolutely we want python dsa
@sameriakhankhan1046
@sameriakhankhan1046 3 года назад
DSA concept is same everywhere but in languages writing of code is different.
@clubsign36
@clubsign36 2 года назад
dsa is same for all langauge infact it is not for one langauge ...concept same hai just acc to lanaguage chize change krni hoti hai
@clubsign36
@clubsign36 2 года назад
@@atharvak1503 dsa is same for all langauge infact it is not for one langauge ...concept same hai just acc to lanaguage chize change krni hoti hai
@pwian2362
@pwian2362 4 месяца назад
mughe toh yeh easy level bhi samajhne mein dikkat horhi haiii🙁
@sourabsen9679
@sourabsen9679 2 года назад
Thank you so much for explaining recursion in such simple yet detailed manner.
@Pankaj_Mandal7028
@Pankaj_Mandal7028 5 месяцев назад
In last question Calculate power: calcPower(x,n/2) was called twice, this can be optimised by storing the value in a variable. Overall very good video. Thankyou!
@prathmeshsingh9699
@prathmeshsingh9699 Год назад
Madam your way of explaining is awesome
@vishvjeet1551
@vishvjeet1551 9 месяцев назад
di ek linux one shot lekar aao. it will many students
@sanjanakatala4311
@sanjanakatala4311 2 года назад
thank you so much shraddha. finally beacuse of you i could understand functions and recursions in a very interesting and an easy manner. one small request-if you could make a series like java for various individual topics for python,it will be a great great help
@pavanmadagani7725
@pavanmadagani7725 Год назад
VARANASI SARALA PUUKU MUNDADHI
@umabharti2989
@umabharti2989 Год назад
✨✨
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@mubeenmavia4
@mubeenmavia4 Год назад
Hello guys! I am from Pakistan. I am learning java from this channel and she is one of the best teachers on RU-vid . The way she explains it is exceptional. I found this channel very valuable
@ramaplayz6934
@ramaplayz6934 Год назад
love from India bro
@onlyentertainment1988
@onlyentertainment1988 Год назад
Pakistani not allowed get lost 🤬
@satyamojha8504
@satyamojha8504 11 месяцев назад
Hate from india bro🔪
@CoDeXplosion
@CoDeXplosion 2 месяца назад
I guess there is one issues in the stack height log(n) problem For each call to printPower, if 𝑛 is not zero, the function makes two recursive calls to printPower(x, n / 2). This results in an exponential number of calls and a stack height proportional to 𝑛, since each call spawns two more calls without reducing the problem size sufficiently. To achieve a stack height of log(𝑛), you should make only one recursive call in each step and use the result to compute the final power. public class powerWithStackHeightLogN { public static int printPower(int x, int n) { if (n == 0) { return 1; } int halfPower = printPower(x, n / 2); if (n % 2 == 0) { return halfPower * halfPower; } else { return x * halfPower * halfPower; } } Please have a look into this....
@abhijitjha4409
@abhijitjha4409 Год назад
public static int sum(int n){ if(n==0) return 0; else return n+sum(n-1); } Better Time Complexity and Space Complexity
@Youtube-Falcon
@Youtube-Falcon 2 года назад
In the last question it was very tough to understand and i couldn't find anyone who can dry run this and explains 1. how calcpower (x , n/2) is able to return a value while what to do in function isn't defined 2. What if n==1 , bcoz it isn't the base condition . So if anybody who is stucked in there reply your question here . And many many thanks to Microsoft wali didi for exposing us to such types which aren't available in such a easy language
@hemamadala1868
@hemamadala1868 6 месяцев назад
same doubt, if u got to know the answer please explain to me
@abdullahnawaz6396
@abdullahnawaz6396 Год назад
really informative...the way you are teaching to students its quite commendable .hats off
@prachithakur7061
@prachithakur7061 21 день назад
what data structure would you most likely seen in non recursive implementation of a recursive algorithm???
@monika_12934
@monika_12934 4 месяца назад
your teaching is FAB . I will join college this year and i am looking forward to watch your videos through my whole journey. Thank you for this amazing playlist didi..
@rajeshkumarchaudhary8525
@rajeshkumarchaudhary8525 Год назад
i am trying to understand recursion from many resources but finally understand now.thanks
@errorless7921
@errorless7921 Год назад
22:56 System.out.println(6-n)
@abhijitmondal9203
@abhijitmondal9203 2 года назад
Awesome teaching style. Great illustrations. Keep it up. 👍🤘🙂
@ZainDiscoveries
@ZainDiscoveries Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWx5ZAFkSfk.html
@smilemania5102
@smilemania5102 3 года назад
Now quality comes
@sohamtanpathak9067
@sohamtanpathak9067 Год назад
Perfectly explained each question, last question was mind blowing!
@virajgarware6506
@virajgarware6506 3 года назад
Please make video on Satya Nadella and Tim Cook and mark Zuckerberg
@armankhan-pl6sw
@armankhan-pl6sw Год назад
public static int SumOfN(int n) { if (n == 0) return 0; return n += SumOfN(n - 1); }
@vikalp.pandey
@vikalp.pandey Год назад
public class Recursion { public static void printfact(int i, int n , int fact){ if(i==n){ fact *=i; System.out.println(fact); return ; } fact *= i; printfact(i+1,n,fact); } public static void main(String args[]){ printfact(1,6,1); } }
@ExpertFact49
@ExpertFact49 5 месяцев назад
Very very easy concept 😊
@paragshende3390
@paragshende3390 4 месяца назад
fibonachi series uptil n numbers public class Main{ public static void fiboSeries(int a,int b,int n){ if(n==0){ return; } int c=a+b; a=b; b=c; System.out.println(c); fiboSeries(a, b, n-1); } public static void main(String args[]){ int a=0; int b=1; int n=5; System.out.println(a); System.out.println(b); fiboSeries(a, b, n-2); } }
@deepakgaroda975
@deepakgaroda975 2 года назад
Now my Recursion Concept clear your teaching way Awesome mam ....
@technicaladda7841
@technicaladda7841 2 года назад
Lots of love to your lactures seriously now I am able to learn recursion otherwise I was thinking recursion is not my type 😂
@salahiansofficial424
@salahiansofficial424 3 года назад
Thanks for this amazing explanation on recursion
@te-a-64-vivekyadav87
@te-a-64-vivekyadav87 Год назад
public static int printSum(int n , int m){ if(n ==m){ return m; } else{ return n+ printSum(n-1 , m); } } public static void main(String args [ ] ){ int n =5; // 3+4+5 = 12 int m = 3; // print sum from 3 to 5 int ans = printSum(n , m); syso(ans); } To print sum of number between m to n by recursion method
@Rorgerl
@Rorgerl 3 года назад
Please Make Series Of Java + DSA
@sanihanglimbu1413
@sanihanglimbu1413 2 года назад
thank you so much didi for this wonderful lecture.
@psychoArvind
@psychoArvind Год назад
The best part is you know shraddha didi hindi + English dono me hi explain kar deti hai toh smjh me bohot ache se aa jata hai 😊
@ABDULREHMANJAVED-h4z
@ABDULREHMANJAVED-h4z Год назад
Very Helpful Thank you so much for explaining recursion in such a simple yet detailed manner.
@Lucien88
@Lucien88 Год назад
factorial ke liye i did this. public static void Factorial( int n, int fac){ if(n==0){ System.out.println(fac); return; } fac = fac*n; Factorial(n-1, fac); }
@HarshSingh-fk5mc
@HarshSingh-fk5mc 3 года назад
Bhaiya kaha se start karu samjh hi ni aa raha ki kaha se padhu ..
@brutalsharma5194
@brutalsharma5194 3 года назад
ru-vid.com/group/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
@monikanagar2792
@monikanagar2792 2 года назад
You are given a sequence of numbers of size N. You have to find if there is a way to insert + or - operator in between the numbers so that the result equals K. How to solve this problem using recursion?
Далее
Recursion in One Shot | 9 Best Problems
1:37:05
Просмотров 978 тыс.
5 Simple Steps for Solving Any Recursive Problem
21:03
How I Mastered Data Structures and Algorithms
10:45
Просмотров 194 тыс.
NADIR ALI PODCAST FEATURING DR ZAKIR NAIK !!
1:41:28
C_104 Recursion in C | Introduction to Recursion
18:51
Просмотров 423 тыс.
Why People Quit Coding? 3 Major Reasons
17:36
Просмотров 1,6 млн