Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found in th...
翻译
给定一个整型已排序数组,找到一个给定值在其中的起点与终点。
你的算法复杂度必须低于O(logn)。
如果目标在数组中不会被发现,返回[-1, -1]。
例如,给定[5, 7, 7, 8, 8, 10],目标值为8,返回[3, 4]。
原文
Given a sorted array of integers,
find the starting and ending ...