Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 462 Bytes

README.md

File metadata and controls

8 lines (6 loc) · 462 Bytes

Binary-Search

Quick binary search implementation for a data structures refresher

This program utilizes one method- binarySearch(int[] a,int x) to implement a binary search. The method takes in an array "a" and an integer value "x." The method searches the array "a" for the value "x."

The main method passes an array and a value into the method and then prints the result (the index of the value if it is found, or -1 if it is not found) to the console.