CSCI_1370 Worksheet Student Name: __________________ Worksheet is due on Blackboard 11:55pm, Wednesday, 29 July 2020. Recursion What does Recursion Require? Termination Condition Call the Clone (same function) Move towards Termination Condition Label the Recursion Requirements. Show the Activation Stack for n = 4. int fact(int n) { int result; if(n==1) return 1; result = fact(n-1) * n; return result; } Answer: fact(4) fact(3) fact(2) fact(1) return 1 return 2*1 = 2 return 3*2 = 6 return 4*6 = 24 boolean isPal(String s) Show the Activation Stack for “ZEROREZ” { if(s.length() == 0 || s.length() == 1) // if length =0 OR 1 then it is return true; if(s.charAt(0) == s.charAt(s.length()-1)) // check first and last char