A binary search approach to word completion