Given the function below, what is the value of g ( 3 ) ? ( 3 )
Fantastic news! We've Found the answer you've been seeking!
Question:
Given the function below, what is the value of g(3)?
private int g(int num){
if(num <=1){
return 1;
}else {
return 3*g(num−1)+ g(num−2);
}
}
choose the correct option:
a−This section is incorrect in some way
B−43
C−4
d−13
Related Book For
Data Structures and Algorithms in Java
ISBN: 978-1118771334
6th edition
Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
Posted Date: