10 2017 档案

摘要:题目描述 One of the tasks in the Byteotian Intelligence Test (BIT) is to cross out numbers from an initial sequence in such a way that leaves as a result 阅读全文
posted @ 2017-10-04 00:06 秃猴 阅读(286) 评论(0) 推荐(0)
摘要:二分是啥? 在有序的序列中进行折半查找,可以做到log n的时间查询。 咋二分? 将n个元素分成大致相等的两部分,取a[mid]与x做比较 如果x = a[n/2],则找到x,算法中止 如果x < a[n/2],则只要在数组a的左半部分继续搜索x 如果x > a[n/2],则只要在数组a的右半部分搜 阅读全文
posted @ 2017-10-03 20:37 秃猴 阅读(304) 评论(0) 推荐(0)