Return the index at which value i should be inserted in order to maintain sorted order.
Return the index at which value i should be inserted in order to maintain sorted order. This assumes that the existing elements already already sorted. If value i is already present, return its index.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found. Do so more efficiently by assuming that the contents are sorted in ascending order. Look by starting near the last index as which a search was successful.