Question: this is in C++ (please clarify how where to include the functions in .h and .cpp etc) Coding exercise 1 Analyze the file lucas.cpp provided

 this is in C++ (please clarify how where to include thefunctions in .h and .cpp etc) Coding exercise 1 Analyze the file

lucas.cpp provided in the assignment. It contains a recursive function to compute

this is in C++ (please clarify how where to include the functions in .h and .cpp etc)

Coding exercise 1 Analyze the file lucas.cpp provided in the assignment. It contains a recursive function to compute the nth Lucas number Using a Linux environment or your IDE, debug through the code2 in gdb3 to understand in what order the function lucas is called and with what parameters. In a file called Lucas.txt, list the function calls and returns in the order in which they were made when n7. Eg., when n-4, the list of function calls and returns is 1. Call lucas(4) 2. Call lucas(3) 3. Call lucas(2) 4. Returning 1 from lucas(2) 5. Call lucas(1) 6. Returning 2 from lucas(1) 7. Returning 3 from lucas(3) 8. Call lucas(2) 9. Returning 1 from lucas(2) 10. Returning 4 from lucas(4) Coding exercise 2 In a file called palindrome.txt, write the pseudocode to recursively check if a string is a palindrome or not. A palindrome is a string that reads the same backwards and forwards. E.g., racecar. In your implementation, you may assume that there are no spaces in the input string Once you have the pseudocode, write a function bool check_palindrome (const string &s) in a file called palindrome.cpp that implements the recursive algorithm you have written. Determine the computational complexity of your code and report it in palindrome.txt. Coding exercise 3 Extend your implementation of the arrayList template from Lab 3 to include a function called elemType getMin( that finds the smallest element in a list. Implement this function using recursion. Lucas txt #include using namespace std; unsigned int lucas(unsigned int n)f if(n0) throw "No Oth Lucas Number"; if(n = 1){ return 2; if(n = 2){ return 1; return lucas(n-1)+ lucas(n-2); int main() unsigned int n = 7; cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!