Follow up for "Find Minimum in Rotated Sorted Array":
What if duplicates are allowed?Would this affect the run-time complexity? How and why?
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
Find the minimum element.
The array may contain duplicates.
{优快云:CODE:635796}

本文探讨了在已排序数组旋转后包含重复元素的情况下,如何找到最小元素的问题。讨论了时间复杂度的变化,并提供了解决方案。
364

被折叠的 条评论
为什么被折叠?



