Question

 

Implement a recursive binary search algorithm on your system to search for a number 100 in the following array of integers:
10 35 40 45 50 55 60 65 70 100

10 May 2026
Answer :
Word Count : 557
Recursive binary search is an efficient searching technique used to locate an element in a sorted array. It works by repeatedly dividing the array into two halves and comparing the target element with the middle element. If the target matches the middle element, the search is successful. If the target is smaller, the search continues in the left half; otherwise, it continues in the right half. The recursive approach repeatedly calls the same function until the element is found or the search interval becomes invalid. The given sorted array is: 10 35 40 45 50 55 60 65 70 100 The target number to be searched is 100. The recursive binary search algorithm can be implemented as follows in C language: ```c #include int binarySearch(int arr[], int low, int high, int key) { if(low <= high) { int mid = (low + high) / 2; if(arr[mid] == key) return mid; else if(arr[mid] > key) return binarySearch(arr, low, mid - 1, key); else return binarySearch(arr, mid + 1, high, key); } return -1; } int main() { int arr[] = {10, 35, 40, 45, 50, 55, 60, 65, 70, 100}; int n = 10; int key = 100; int result = binarySearch(arr, 0, n - 1, key); if(result != -1) printf("Element found at index %d", result); else printf("Element not found"); return 0; }
__________ _________ _________ _____ _______ ________ __________ ______.
______ ____ __________ ______ _____ ____ __________ __________ __________.
___ ___ ____ ______ ________ _______ _____ _______ ________ _____ ____.
_______ __________ ___ _________ _______ ___.
__________ ________ ______ __________ _______ _________ ________ ____.
__________ ___ ___ _________ _________ _____ _________ ____ _____ _______ ____ ___.
_______ ____ __________ __________ ___.
____ _______ ____ ___ _____ ________ ___ ___ _________.
________ _______ _______ ___ _______ ________ ___ _________ __________ ______ ___ __________.
_________ _______ _________ _______ ____ __________ __________ ____ _________ _________.
__________ ___ ___ ___ ____.
________ __________ _______ ____ ______ __________ _____ __________ _________ __________ ___ ____.
_____ ____ ____ __________ ________ _________ __________ __________ ________ _______ _______.
____ _______ _______ ________ ______ _______ ____ ______ _____ ______.
________ __________ __________ __________ ____.
______ __________ _________ _______ __________ ____ ____ _______ _______ ____.
__________ _______ ________ ___ ________ ___ __________ ______.
___ _________ _________ ______ __________.
_________ ____ _____ _________ ____ ______ _____ _________ ______ _______.
_________ __________ __________ ________ _________ ___ ________ ___ ________ _________ _________.
_______ __________ ____ ____ _________ _________ _________ ____ _____ _____.
_____ ____ _________ ________ _______.
________ ___ _______ _____ ____ __________ __________ ________.
________ ____ _______ ________ _____.
_____ ____ _________ _________ _______ ___ ___.
____ ______ ____ ____ ______ _______ ______ _________ ____.
_______ ____ ________ _____ ____ _______ _______.
__________ ____ __________ _________ _______.
____ ______ ____ _____ ____.
_____ _____ __________ ________ ____ _____ __________.
_________ ___ __________ ________ _____ ____ _____ ________.
_________ __________ _______ __________ __________ ____ ___ ______ ________ _______.
_______ _________ __________ _______ ________ ______ __________ ________ ____ _____.
______ _______ ____ ________ __________ __________ ___ ____ _____.
_________ _________ ____ ___ _________ _____ _______ ______.
_________ ______ __________ ____ __________ _________ ________ ______ ____ __________ _____ __________.
_________ __________ _______ ________ ________ _______ ________ ___ _________ ________.
_________ __________ _____ _________ __________ ___ __________ ________ ________.
________ _________ ____ ____ __________ ____.
______ _______ ______ ______ ___ ________ __________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MST 19 2026 -  Implement a recursive binary search algorithm on your system | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→