increase left index when left element equals mid one