input: Write a python function to find the index of an element in a list using binary search.
  assert optimized_find_element([1, 2, 3, 4, 5, 6, 7, 8, 9], 7) == 6
  assert optimized_find_element([10, 20, 30, 40, 50, 60, 70, 80, 90], 50) == 4
  assert optimized_find_element([15, 25, 35, 45, 55, 65, 75, 85, 95], 25) == 1
output: def optimized_find_element(arr, target):
      left, right = 0, len(arr) - 1
      while left <= right:
          mid = (left + right) // 2
          if arr[mid] == target:
              return mid
          elif arr[mid] < target:
              left = mid + 1
          else:
              right = mid - 1
      return -1