Skip to content

Latest commit

 

History

History

BinarySearch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

java-resource

Refresher and resource for OOP concepts, collections, generics, conventions and more.

Binary Search

The algorithm compares the key value with the middle element of the sorted array; if they are unequal, the half in which the key cannot be part of is eliminated, and the search continues for the remaining half until it succeeds.

This can be seen in the Theatre class comments, in the reserveSeat method.