Solved SearchInsertPosition in java