Bài giảng Data Structures & Algorithms - Chương 2: Function & Recursion
1. Function
2. The Concept Of Stack
3. The Sequence Of Execution During A Function Call
4. Parameter Passing & Call By Reference
5. Resolving Variable References
6. Recursion
7. Stack Overheads In Recursion
8. Writing A Recursive Function
9. Types Of Recursion
Click to edit Master title style Click to edit Master text styles Second level Third level Fourth level Fifth level 05/05/2014 ‹#› Data Structures & Algorithms Function & Recursion 1. Function 2. The Concept Of Stack 3. The Sequence Of Execution During A Function Call 4. Parameter Passing & Call By Reference 5. Resolving Variable References 6. Recursion 7. Stack Overheads In Recursion 8. Writing A Recursive Function 9. Types Of Recursion 1. FUNCTION Provide modularity to the software Divide complex tasks into small Manageable tasks Avoid duplication of work int sumOfArray(int M[] , int n) { int nSum=0; for(int i=0;iH2 7 2 1 3 2 1 1 2 0 1 void H10toH2(int n) { int t=n%2; if(n>0) H10toH2(n/2); coutE9 exercises IF not complete… END
File đính kèm:
- Chapter 2-Function & Recursion.pptx