The array is as follows: 1,2,3,6,8,10. Given that the number 17 is to be searched. At which call it tells that there’s no such element? (By using linear search(recursive) algorithm)
A. 7th call
B. 9th call
C. 17th call
D. The function calls itself an infinite number of times
Answer:A
The array is as follows: 1,2,3,6,8,10. Given that the number 17 is to be searched. At which call it tells that there’s no such element? (By using linear search(recursive) algorithm)
A. 7th call B. 9th call C. 17th call D. The function calls itself an infinite number of times