Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 580 Bytes

File metadata and controls

16 lines (12 loc) · 580 Bytes

Binary Search of Sorted Array

Given a sorted array and a key value use binary search to return the index of the key value.

Whiteboard Process

Binary Search

Approach & Efficiency

We utilized the binary search method. Declare a start, mid, and end variable. Ressign start or end based on where the target is in comparison to the mid value.

Big O:

  • Space: O(n)
  • Time: O(Logn)