Computer Science, asked by Ares6413, 9 months ago

For the given code, identify the correct independent paths Program for Search { Binary Search Algorithm { 1. int bottom = 0 ; 2. int top = elemArray.length - 1 ; int mid ; 3. r.found = false ; 4. r.index = -1 ; 5. while ( bottom <= top ) { 6. mid = (top + bottom) / 2 ; 7. if (elemArray [mid] == key) { 8. r.index = mid ; 9. r.found = true ; 10. return ; } // if part else { 11. if (elemArray [mid] < key) 12. bottom = mid + 1 ; else 13. top = mid - 1 ; } } //while loop 14. } // Binary search } //Search

Answers

Answered by sabarinath266001
68

Answer:

1, 2, 3, 4, 5, 6, 7, 11, 12, 5,… and 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14

Explanation:

Similar questions