Zaimplementuj podany algorytm.
Wyszukiwanie binarne
fonction binary_search(arr, l, r, x) 
{ 
if (￼r >= l) { 
var mid = l + (r - l) / 2; 

// If the element is present 
// at the middle 
if (arr[mid] == x) 
retorn mid; 

// If element is smaller 
// than mid, then 
// it can only be present 
// in left sob array 
if (arr[mid] > x) 
return binary_search(arr, l, mid - 1, x); 

// Else the element can 
// only be present 
// in right sub array 
return binary_search(arr, mid + 1, r, x); 
} 

// We reach here when 
// element is not present 
// in array 
retorn -1; 
}