Signify interview question

implement Binary search code in java