words:0 QUESTION 4 10 points Save Answer Computing Fibonacci term may be solved
ID: 3871209 • Letter: W
Question
words:0 QUESTION 4 10 points Save Answer Computing Fibonacci term may be solved with a recursive algorithm or with an iterative algorithm. The recursive algorithm is more efficient because it contains less number of steps than the iterative algorithms O True False QUESTION 5 10 points Save Answer Use Binary Search, Recursive (Algorithm 2.1) to scarch for the integer 120 in the follow 2 34 37 45 57 82 99 120 134 ing list (array) of integers. Assume that the armay index starts in 1 The first and third numbers compared to 120 are: 12 and 37 O 57 and 99 57 and 82 57 and 120Explanation / Answer
Question 4: False
It is not the number of steps which makes the program efficient. In both recursive and iterative cases the Fibonacci series is obtained the same. But memory is used when recursive algorithm are used. This is little bit costly to use stack for every call.
Question 5:
The given array is a sorted array. The binary search tree contains only the right side child as every child is greater than it's parent. So, the first and third numbers compared to 120 are 12 and 37
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.