Searching on Data Structure and Algorithms related Questions and Answers - Page 7

Question 63 : Given an array arr = {45,77,89,90,94,99,100} and key = 99; what are the mid values(corresponding array elements) in the first and second levels of recursion?
1. 90 and 99
2. 90 and 94
3. 89 and 99
4. 89 and 94
View Answer   Discuss with Members

Question 64 : Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are done until the element is found?
1. 1
2. 3
3. 4
4. 2
View Answer   Discuss with Members

Question 65 : Given delta[4] is a global array and number of elements in the sorted array is 10, what are the values in the delta array?
1. 4, 3, 1, 0
2. 5, 3, 1, 0
3. 4, 2, 1, 1
4. 5, 2, 1, 1
View Answer   Discuss with Members

Question 66 : Given, arr = {1,3,5,6,7,9,14,15,17,19} key = 17 and delta = {5,3,1,0}
How many key comparisons are made?(exclude the comparison used to decide the left or right sub array)
1. 4
2. 3
3. 5
4. 6
View Answer   Discuss with Members

Question 67 : The array is as follows: 1,2,3,6,8,10. At what time the element 6 is found? (By using linear search(recursive) algorithm)
1. 4th call
2. 3rd call
3. 6th call
4. 5th call
View Answer   Discuss with Members

Question 68 : Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations?
1. 90 and 99
2. 90 and 100
3. 89 and 94
4. 94 and 99
View Answer   Discuss with Members

Question 69 : Given an input arr = {2,5,7,99,899}; key = 899; What is the level of recursion?
1. 5
2. 2
3. 3
4. 4
View Answer   Discuss with Members

Question 70 : 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)
1. 7th call
2. 9th call
3. 17th call
4. The function calls itself infinite number of times
View Answer   Discuss with Members


View 61 - 70 of 118 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter