title
Re 5. Multiple Recursion Calls | Problems | Strivers A2Z DSA Course

description
Check our Website: https://www.takeuforward.org/ In case you are thinking to buy courses, please check below: Link to get 20% additional Discount at Coding Ninjas: https://bit.ly/3wE5aHx Code "takeuforward" for 15% off at GFG: https://practice.geeksforgeeks.org/courses Code "takeuforward" for 20% off on sys-design: https://get.interviewready.io?_aff=takeuforward Crypto, I use the Wazirx app: https://wazirx.com/invite/xexnpc4u Take 750 rs free Amazon Stock from me: https://indmoney.onelink.me/RmHC/idjex744 Earn 100 rs by making a Grow Account for investing: https://app.groww.in/v3cO/8hu879t0 Linkedin/Instagram/Telegram: https://linktr.ee/takeUforward ---------------------------------------------------------------------------------------------------------------------------------------------------- Please check out the entire channel for other sets of series on tougher and complex topics. Also do consider subscribing :) Please check out the SDE sheet which the entire country is using and getting placed at top-notch companies: https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems/ Checkout Striver's Handles: https://linktr.ee/takeUforward

detail
{'title': 'Re 5. Multiple Recursion Calls | Problems | Strivers A2Z DSA Course', 'heatmap': [{'end': 644.446, 'start': 622.473, 'weight': 0.898}], 'summary': 'Covers multiple recursion calls, delving into fibonacci numbers and recursion, demonstrating the transition from single to multiple function calls, providing a detailed example of recursion in finding the nth fibonacci number, and explaining recursion trees, execution order, and time complexity with quantified results for f(4), f(3), f(2), and f(1), showing exponential growth near 2 to the power of n.', 'chapters': [{'end': 70.166, 'segs': [{'end': 70.166, 'src': 'embed', 'start': 22.147, 'weight': 0, 'content': [{'end': 30.733, 'text': 'so over here we will be learning something of this pattern where probably we will have a function and there will be multiple function calls.', 'start': 22.147, 'duration': 8.586}, {'end': 37.22, 'text': 'yes, this is two times, so the function is called twice or thrice or four times.', 'start': 30.733, 'duration': 6.487}, {'end': 39.901, 'text': "so you'll be learning multiple recursion calls.", 'start': 37.22, 'duration': 2.681}, {'end': 46.445, 'text': 'now, generally, in all the problems that we will be solving, there might be two times, three times, four times, and so on.', 'start': 39.901, 'duration': 6.544}, {'end': 52.368, 'text': "so in this video i'll be teaching you how to how to have, uh, two multiple recursion calls.", 'start': 46.445, 'duration': 5.923}, {'end': 58.215, 'text': "and going forward you will be seeing problems like n, queen and other problems where you'll see multiple,", 'start': 52.368, 'duration': 5.847}, {'end': 62.583, 'text': 'not only two n recursion calls being happening inside a function.', 'start': 58.215, 'duration': 4.368}, {'end': 70.166, 'text': 'okay, so to understand multiple recursion calls, the best example is Doing the Fibonacci number.', 'start': 62.583, 'duration': 7.583}], 'summary': 'Learning multiple recursion calls with examples like fibonacci number.', 'duration': 48.019, 'max_score': 22.147, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE22147.jpg'}], 'start': 0.189, 'title': 'Multiple recursion calls', 'summary': 'Introduces the concept of multiple recursion calls, using the fibonacci number as an example and emphasizing the shift from single to multiple function calls in problem-solving.', 'chapters': [{'end': 70.166, 'start': 0.189, 'title': 'Multiple recursion calls', 'summary': 'Introduces the concept of multiple recursion calls, focusing on the fibonacci number as an example and emphasizing the shift from single to multiple function calls in problem-solving.', 'duration': 69.977, 'highlights': ['The chapter emphasizes the shift from single to multiple function calls in problem-solving, particularly in the context of the Fibonacci number and other problems like n queen.', 'It highlights the focus on teaching multiple recursion calls and the application in problems where there are multiple n recursion calls happening inside a function.', 'The chapter introduces the concept of multiple recursion calls and the pattern of having a function with multiple function calls, such as two times, three times, or four times.']}], 'duration': 69.977, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE189.jpg', 'highlights': ['The chapter emphasizes the shift from single to multiple function calls in problem-solving, particularly in the context of the Fibonacci number and other problems like n queen.', 'The chapter introduces the concept of multiple recursion calls and the pattern of having a function with multiple function calls, such as two times, three times, or four times.', 'It highlights the focus on teaching multiple recursion calls and the application in problems where there are multiple n recursion calls happening inside a function.']}, {'end': 635.762, 'segs': [{'end': 147.421, 'src': 'embed', 'start': 120.918, 'weight': 0, 'content': [{'end': 126.482, 'text': "you'll be given a problem, you'll be given an n and you need to write a recursive function.", 'start': 120.918, 'duration': 5.564}, {'end': 133.827, 'text': 'yes, you need to write a recursive function which tells you which is the nth Fibonacci number.', 'start': 126.482, 'duration': 7.345}, {'end': 135.909, 'text': 'for an example, I say f of 3.', 'start': 133.827, 'duration': 2.082}, {'end': 137.51, 'text': 'so which is the third Fibonacci number?', 'start': 135.909, 'duration': 1.601}, {'end': 140.818, 'text': "2? if I say f of 4, That's three.", 'start': 137.51, 'duration': 3.308}, {'end': 142.419, 'text': "If it's F of five, that's five.", 'start': 141.079, 'duration': 1.34}, {'end': 145.16, 'text': 'So you have to give me the nth Fibonacci number.', 'start': 142.799, 'duration': 2.361}, {'end': 147.421, 'text': 'Now, generally, what did I say??', 'start': 146.081, 'duration': 1.34}], 'summary': 'Write a recursive function to find the nth fibonacci number.', 'duration': 26.503, 'max_score': 120.918, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE120918.jpg'}, {'end': 234.103, 'src': 'embed', 'start': 203.368, 'weight': 1, 'content': [{'end': 210.44, 'text': "And that is where something like Fibonacci plays a very important part because it's going to teach you recursion in a very classical fashion.", 'start': 203.368, 'duration': 7.072}, {'end': 219.049, 'text': 'So, we did learn that in order to find f of n, we have to know f of n minus 1 and we have to know f of n minus 2.', 'start': 210.76, 'duration': 8.289}, {'end': 220.49, 'text': 'Correct That is something we did learn.', 'start': 219.049, 'duration': 1.441}, {'end': 234.103, 'text': 'So, in case our function takes n, we know one thing for sure if n is anything great, uh, lesser than equal to one, if it is n is zero,', 'start': 220.971, 'duration': 13.132}], 'summary': 'Learning recursion through fibonacci with f(n), f(n-1), and f(n-2)', 'duration': 30.735, 'max_score': 203.368, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE203368.jpg'}, {'end': 385.795, 'src': 'embed', 'start': 359.452, 'weight': 3, 'content': [{'end': 365.233, 'text': 'so it happens uh, what what to say, line by line, like whichever recursion call is made,', 'start': 359.452, 'duration': 5.781}, {'end': 369.294, 'text': 'first it will go and call it and after that it will go for the next one.', 'start': 365.233, 'duration': 4.061}, {'end': 370.774, 'text': 'that is how recursion works.', 'start': 369.294, 'duration': 1.48}, {'end': 372.875, 'text': "right to understand this in deep, let's.", 'start': 370.774, 'duration': 2.101}, {'end': 376.533, 'text': "uh. let's just take this example over here.", 'start': 372.875, 'duration': 3.658}, {'end': 385.795, 'text': 'i can say this call will go and if this call goes, this will call f of 3, because n minus 1 for this 4 is nothing but 3 correct.', 'start': 376.533, 'duration': 9.262}], 'summary': 'Recursion works by calling functions line by line, as demonstrated by the f(3) example.', 'duration': 26.343, 'max_score': 359.452, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE359452.jpg'}], 'start': 71.007, 'title': 'Understanding recursion in fibonacci numbers', 'summary': 'Delves into the concept of fibonacci numbers and recursion, demonstrating how to use recursion to find the nth fibonacci number. it also provides a detailed example illustrating the step-by-step execution of a recursive function and how recursion calls work in a sequential manner.', 'chapters': [{'end': 332.602, 'start': 71.007, 'title': 'Understanding fibonacci number and recursion', 'summary': 'Explores the concept of fibonacci numbers and recursion, illustrating how to use recursion to find the nth fibonacci number and its significance in learning recursion, emphasizing the classical fashion of teaching recursion through fibonacci.', 'duration': 261.595, 'highlights': ['The chapter explores the concept of Fibonacci numbers and recursion, illustrating how to use recursion to find the nth Fibonacci number.', 'The significance of Fibonacci in learning recursion is emphasized, highlighting its classical fashion of teaching recursion through Fibonacci.', 'The recursive function to find the nth Fibonacci number is explained, showcasing examples such as f(3) = 2, f(4) = 3, and f(5) = 5.']}, {'end': 635.762, 'start': 332.602, 'title': 'Understanding recursion in depth', 'summary': 'Explains recursion through a detailed example, demonstrating the step-by-step execution of a recursive function and how it returns the value for a given input, ultimately showcasing how recursion calls work in a sequential manner.', 'duration': 303.16, 'highlights': ['The recursive function is demonstrated step by step, showing the execution of each recursion call and the value returned for a given input.', 'The example culminates in the understanding of how recursion calls work in a sequential manner, with each recursion call being executed one after the other.', 'The explanation emphasizes the sequential execution of recursion calls, showcasing how each recursion call is handled before the next one is executed.']}], 'duration': 564.755, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE71007.jpg', 'highlights': ['The recursive function to find the nth Fibonacci number is explained, showcasing examples such as f(3) = 2, f(4) = 3, and f(5) = 5.', 'The chapter explores the concept of Fibonacci numbers and recursion, illustrating how to use recursion to find the nth Fibonacci number.', 'The significance of Fibonacci in learning recursion is emphasized, highlighting its classical fashion of teaching recursion through Fibonacci.', 'The example culminates in the understanding of how recursion calls work in a sequential manner, with each recursion call being executed one after the other.', 'The recursive function is demonstrated step by step, showing the execution of each recursion call and the value returned for a given input.', 'The explanation emphasizes the sequential execution of recursion calls, showcasing how each recursion call is handled before the next one is executed.']}, {'end': 995.478, 'segs': [{'end': 662.073, 'src': 'embed', 'start': 635.762, 'weight': 5, 'content': [{'end': 642.785, 'text': "if i wish to draw the recursion tree, it so so if you see this, it's in the this level, horizontal.", 'start': 635.762, 'duration': 7.023}, {'end': 644.446, 'text': 'so the recursion tree is generally vertical.', 'start': 642.785, 'duration': 1.661}, {'end': 646.107, 'text': 'so you can easily draw it.', 'start': 644.446, 'duration': 1.661}, {'end': 647.607, 'text': 'see, this is the f of four.', 'start': 646.107, 'duration': 1.5}, {'end': 649.168, 'text': 'so you can write f of four.', 'start': 647.607, 'duration': 1.561}, {'end': 653.79, 'text': "so let's quickly erase this so that i can write it over here.", 'start': 649.168, 'duration': 4.622}, {'end': 656.631, 'text': 'so you can write f of four.', 'start': 653.79, 'duration': 2.841}, {'end': 657.811, 'text': 'whom did f of four call?', 'start': 656.631, 'duration': 1.18}, {'end': 662.073, 'text': "let's see f of four called uh, whom it called.", 'start': 657.811, 'duration': 4.262}], 'summary': 'Recursion tree is vertical, f of four called another function.', 'duration': 26.311, 'max_score': 635.762, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE635762.jpg'}, {'end': 717.686, 'src': 'embed', 'start': 690.657, 'weight': 3, 'content': [{'end': 695.539, 'text': 'this one gets executed first, so f of three is executed at the first.', 'start': 690.657, 'duration': 4.882}, {'end': 700.481, 'text': 'for f of three, Who are the recursion calls? f of 2 and f of 1..', 'start': 695.539, 'duration': 4.942}, {'end': 703.447, 'text': 'But who is executed first? f of 2.', 'start': 700.481, 'duration': 2.966}, {'end': 708.502, 'text': 'So please execute f of 2 first, which is f of 1 and f of 0.', 'start': 703.447, 'duration': 5.055}, {'end': 713.304, 'text': 'Again, among these both recursion calls, which one is executed first? f of 1.', 'start': 708.502, 'duration': 4.802}, {'end': 716.065, 'text': 'So, f of 1 indeed returned you a 1.', 'start': 713.304, 'duration': 2.761}, {'end': 717.686, 'text': 'f of 0 returned you a 0.', 'start': 716.065, 'duration': 1.621}], 'summary': 'Recursive function f(n) executed for n=3, 2, 1, 0.', 'duration': 27.029, 'max_score': 690.657, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE690657.jpg'}, {'end': 802.815, 'src': 'embed', 'start': 770.365, 'weight': 4, 'content': [{'end': 771.666, 'text': "It's very important to relate it.", 'start': 770.365, 'duration': 1.301}, {'end': 772.607, 'text': "It's very simple.", 'start': 771.966, 'duration': 0.641}, {'end': 775.609, 'text': 'F of 4, whom does it call? You just have to relate that.', 'start': 772.767, 'duration': 2.842}, {'end': 778.792, 'text': 'F of 4 called last and second last.', 'start': 775.81, 'duration': 2.982}, {'end': 779.793, 'text': 'So, just relate it.', 'start': 779.133, 'duration': 0.66}, {'end': 781.054, 'text': 'Second last, last and second last.', 'start': 779.813, 'duration': 1.241}, {'end': 784.378, 'text': 'Try to relate the horizontal with the vertical recursion tree.', 'start': 781.475, 'duration': 2.903}, {'end': 787.083, 'text': 'Okay, I hope that makes sense.', 'start': 785.242, 'duration': 1.841}, {'end': 792.847, 'text': 'So, if I try to code this super quick, it will be like int f of int n.', 'start': 788.084, 'duration': 4.763}, {'end': 798.612, 'text': 'And then I can be like, if n is less than or equal to 1, you can simply return n.', 'start': 792.847, 'duration': 5.765}, {'end': 802.815, 'text': 'Or else you can say there will be a last of f of n minus 1.', 'start': 798.612, 'duration': 4.203}], 'summary': 'Relate f(4) calling sequence, relate horizontal and vertical recursion, and code for f(n) using if-else condition', 'duration': 32.45, 'max_score': 770.365, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE770365.jpg'}, {'end': 849.421, 'src': 'embed', 'start': 822.453, 'weight': 6, 'content': [{'end': 826.256, 'text': 'you see, over here you got the answer as three, very simple and straightforward.', 'start': 822.453, 'duration': 3.803}, {'end': 828.597, 'text': 'but what about the time complexity?', 'start': 826.256, 'duration': 2.341}, {'end': 830.159, 'text': 'this is a very, very critical thing.', 'start': 828.597, 'duration': 1.562}, {'end': 832.921, 'text': "let's understand the time complexity.", 'start': 830.159, 'duration': 2.762}, {'end': 835.943, 'text': 'how many recursion calls did you made for n equal to four?', 'start': 832.921, 'duration': 3.022}, {'end': 839.798, 'text': "let's see first recursion call.", 'start': 837.557, 'duration': 2.241}, {'end': 841.238, 'text': 'second recursion call.', 'start': 839.798, 'duration': 1.44}, {'end': 842.639, 'text': 'third recursion call.', 'start': 841.238, 'duration': 1.401}, {'end': 844.019, 'text': 'fourth recursion call.', 'start': 842.639, 'duration': 1.38}, {'end': 845.36, 'text': 'fifth recursion call.', 'start': 844.019, 'duration': 1.341}, {'end': 846.7, 'text': 'sixth recursion call.', 'start': 845.36, 'duration': 1.34}, {'end': 848.1, 'text': 'seventh recursion call.', 'start': 846.7, 'duration': 1.4}, {'end': 849.421, 'text': 'eighth recursion call.', 'start': 848.1, 'duration': 1.321}], 'summary': 'The algorithm made 8 recursion calls for n=4.', 'duration': 26.968, 'max_score': 822.453, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE822453.jpg'}, {'end': 924.055, 'src': 'embed', 'start': 873.503, 'weight': 0, 'content': [{'end': 875.744, 'text': 'It is not a unidirectional recursion call.', 'start': 873.503, 'duration': 2.241}, {'end': 878.526, 'text': "It's kind of bidirectional when you call a couple of guys.", 'start': 876.084, 'duration': 2.442}, {'end': 881.949, 'text': "So for every n, you're calling two guys.", 'start': 879.007, 'duration': 2.942}, {'end': 885.851, 'text': 'So, for the next n minus 1, again you call 2 guys.', 'start': 883.049, 'duration': 2.802}, {'end': 888.573, 'text': 'For the next n minus 2, again you call 2 guys.', 'start': 886.331, 'duration': 2.242}, {'end': 893.574, 'text': "So, for every 1, you're calling 2, 2, 2, 2, 2, 2.", 'start': 889.073, 'duration': 4.501}, {'end': 900.241, 'text': "So, can I say it's like 2 to the power n will be the time complexity? Not exactly.", 'start': 893.576, 'duration': 6.665}, {'end': 906.205, 'text': 'Why? Because from 4, you called for 3 and the other one was 1 lesser than 3.', 'start': 900.781, 'duration': 5.424}, {'end': 915.171, 'text': "Thereby it's not exactly 2 to the power n, but you can say it's near about 2 to the power n, which is generally known as exponential in nature.", 'start': 906.205, 'duration': 8.966}, {'end': 917.792, 'text': "if you did not understand, let's understand by recursion tree.", 'start': 915.171, 'duration': 2.621}, {'end': 919.713, 'text': 'see, this was the first level.', 'start': 917.792, 'duration': 1.921}, {'end': 924.055, 'text': 'this guy called couple of guys, correct again, this guy called couple of guys.', 'start': 919.713, 'duration': 4.342}], 'summary': 'Recursion call complexity is near 2^n, demonstrated with a bidirectional example.', 'duration': 50.552, 'max_score': 873.503, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE873503.jpg'}, {'end': 991.454, 'src': 'embed', 'start': 966.172, 'weight': 7, 'content': [{'end': 971.014, 'text': 'so this can be done using dynamic programming where you can trim down.', 'start': 966.172, 'duration': 4.842}, {'end': 973.135, 'text': "but as of now i'll not teach dynamic programming.", 'start': 971.014, 'duration': 2.121}, {'end': 974.536, 'text': "that's coming next.", 'start': 973.135, 'duration': 1.401}, {'end': 975.957, 'text': 'but this should be understandable.', 'start': 974.536, 'duration': 1.421}, {'end': 981.622, 'text': 'why it is two to the power n okay, just in case you still have doubts, put that into the comment section.', 'start': 975.957, 'duration': 5.665}, {'end': 982.864, 'text': 'put that into the comment section.', 'start': 981.622, 'duration': 1.242}, {'end': 984.345, 'text': 'i will definitely reply.', 'start': 982.864, 'duration': 1.481}, {'end': 990.272, 'text': "and yes, if you have understood the multiple recursion calls, please, please, please make sure you like this video and if you're new to this channel,", 'start': 984.345, 'duration': 5.927}, {'end': 991.454, 'text': 'please do consider subscribing.', 'start': 990.272, 'duration': 1.182}], 'summary': 'Introduction to dynamic programming and explanation of recursion calls.', 'duration': 25.282, 'max_score': 966.172, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE966172.jpg'}], 'start': 635.762, 'title': 'Recursion trees and time complexity', 'summary': 'Explains how to draw a recursion tree, emphasizes understanding execution order, and demonstrates the impact on time complexity through examples, quantifying results for f(4), f(3), f(2), and f(1), and showing exponential growth near 2 to the power of n.', 'chapters': [{'end': 770.344, 'start': 635.762, 'title': 'Recursion tree and execution order', 'summary': 'Explains how to draw a recursion tree and emphasizes the importance of understanding the execution order, demonstrating with the example of f(4) and quantifying the results of f(3), f(2), and f(1).', 'duration': 134.582, 'highlights': ['The recursion tree is generally vertical, and the chapter demonstrates drawing the recursion tree for f(4).', 'Explains the execution order in recursion, emphasizing the importance of understanding which recursive call is executed first, and demonstrates the execution order for f(4), f(3), f(2), and f(1).', 'Quantifies the results of f(3) as 2, f(2) as 1, and f(1) as 1, and emphasizes the importance of understanding the horizontal programmatic call in relation to the vertical recursion tree.']}, {'end': 995.478, 'start': 770.365, 'title': 'Recursion time complexity', 'summary': 'Explains the time complexity of a recursive function, where the number of recursion calls made for n is shown to be exponential, specifically near 2 to the power of n, through a detailed example and visualization of recursion trees.', 'duration': 225.113, 'highlights': ['The time complexity of the recursive function is near about 2 to the power of n, which is generally known as exponential in nature, as explained through a visualization of recursion trees and the bidirectional nature of the recursion calls.', 'The number of recursion calls made for n is shown to be exponential, specifically near 2 to the power of n, indicating the significant increase in the number of calls as n increases.', 'The explanation of the time complexity is supported by a detailed example and visualization of recursion trees, highlighting the bidirectional nature of the recursion calls and the resulting exponential growth in calls as n increases.', 'The bidirectional nature of the recursion calls is emphasized, showing that for every n, two recursion calls are made, leading to an exponential growth in the number of calls as n increases.', 'The chapter concludes with the mention of the possibility of optimizing the recursive function using dynamic programming, which will be covered in the next session.']}], 'duration': 359.716, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/kvRjNm4rVBE/pics/kvRjNm4rVBE635762.jpg', 'highlights': ['The time complexity of the recursive function is near about 2 to the power of n, which is generally known as exponential in nature, as explained through a visualization of recursion trees and the bidirectional nature of the recursion calls.', 'The number of recursion calls made for n is shown to be exponential, specifically near 2 to the power of n, indicating the significant increase in the number of calls as n increases.', 'The bidirectional nature of the recursion calls is emphasized, showing that for every n, two recursion calls are made, leading to an exponential growth in the number of calls as n increases.', 'Explains the execution order in recursion, emphasizing the importance of understanding which recursive call is executed first, and demonstrates the execution order for f(4), f(3), f(2), and f(1).', 'Quantifies the results of f(3) as 2, f(2) as 1, and f(1) as 1, and emphasizes the importance of understanding the horizontal programmatic call in relation to the vertical recursion tree.', 'The recursion tree is generally vertical, and the chapter demonstrates drawing the recursion tree for f(4).', 'The explanation of the time complexity is supported by a detailed example and visualization of recursion trees, highlighting the bidirectional nature of the recursion calls and the resulting exponential growth in calls as n increases.', 'The chapter concludes with the mention of the possibility of optimizing the recursive function using dynamic programming, which will be covered in the next session.']}], 'highlights': ['The time complexity of the recursive function is near about 2 to the power of n, indicating exponential growth in the number of calls as n increases.', 'The bidirectional nature of the recursion calls is emphasized, showing that for every n, two recursion calls are made, leading to an exponential growth in the number of calls as n increases.', 'The chapter demonstrates drawing the recursion tree for f(4), emphasizing the importance of understanding the horizontal programmatic call in relation to the vertical recursion tree.', 'The recursive function to find the nth Fibonacci number is explained, showcasing examples such as f(3) = 2, f(4) = 3, and f(5) = 5.', 'The chapter introduces the concept of multiple recursion calls and the pattern of having a function with multiple function calls, such as two times, three times, or four times.', 'The explanation emphasizes the sequential execution of recursion calls, showcasing how each recursion call is handled before the next one is executed.', 'The number of recursion calls made for n is shown to be exponential, specifically near 2 to the power of n, indicating the significant increase in the number of calls as n increases.', 'The significance of Fibonacci in learning recursion is emphasized, highlighting its classical fashion of teaching recursion through Fibonacci.', 'The example culminates in the understanding of how recursion calls work in a sequential manner, with each recursion call being executed one after the other.', 'The chapter emphasizes the shift from single to multiple function calls in problem-solving, particularly in the context of the Fibonacci number and other problems like n queen.']}