二分搜索找到所在区间

找出给定整数在一个有序数组中的区间。html 好比,对于数组“1,3,5,7,10”,给定“2”,找到它在“3”和“5”区间内。要求用二分搜索。时间控制在log2n内。数组 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplicati
相关文章
相关标签/搜索