Q1Single correct5 Marks22 Dec 2024
What will the return value of be?
Procedure DoSomething(x, n)
if(n == 0){
return(1)
}
else{
return(x * DoSomething(x, n - 1))
}
End DoSomething
Topic Mapping: chapter: Week 9 │ topic: Recursion — Self-referential Algorithms │ subtopic: Tracing recursive function execution with base case and recursive step