最佳答案:if (a[curIn] == searchKey) return curIn; else if (lowerBound > upperBound) return nElems; =======