Create a program to implement binary search on a sorted array.
MediumProblem Statement
Create a program to implement binary search on a sorted array.
Sample Input
int arr[] = {2, 4, 6, 8, 10}; int target = 6;Sample Output
Element found at index: 2
Limits
Time: 2s · Memory: 256 MB