MongoDB interview question

Simple coding question involving binary search