Write a program to implement the binary search algorithm on a hardcoded sorted array.
MediumProblem Statement
Write a program to implement the binary search algorithm on a hardcoded sorted array.
Sample Input
Array: [1, 3, 5, 7, 9], Target: 5
Sample Output
Element found at index: 2
Limits
Time: 2s · Memory: 256 MB