【单选题】【消耗次数:1】
有一个长度为7的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为( )。
A.17/7
B.18/7
C.21/7
D.20/7
参考答案:
复制
纠错
相关题目
【单选题】 有一个长度为8的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为( )。
①  A.22/8
②  B.20/8
③  C.23/8
④  D.21/8
【单选题】 有一个长度为11的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为( )。
①  A.29/11
②  B.33/11
③  C.26/11
④  D.30/11
【判断题】 有一个长度为10的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为29/10。
①  正确
②  错误
【单选题】 对于长度为9的顺序存储的有序表,若采用折半查找,在等概率情况下的平均查找长度为( )的9分之一。
①  20
②  18
③  25
④  22
【单选题】 对于长度为18的顺序存储的有序表,若采用折半查找,则查找第15个元素的比较次数为( )。
①  3
②  4
③  5
④  6
【单选题】 对于顺序存储的有序表(5,12,20,26,37,42,46,50,64),若采用折半查找,则查找元素26的比较次数为( )。
①  2
②  3
③  4
④  5
【单选题】 若查找每个元素的概率相等,则在长度为n的顺序表上查找任一元素的平均查找长度为( )。
①  n
②  n+1
③  (n-1)/2
④  (n+1)/2
【简答题】 简述有序表的折半查找算法,并用c语言写出查找算法核心代码。
【单选题】 采用顺序查找方法查找长度为n的线性表时,每个元素的平均查找长度为( )。
①  A.n
②  B.n/2
③  C.(n+1)/2
④  D.(n-1)/2
【单选题】 在有序表{10,14,34,43,47,64,75,80,90}中,用折半查找法查找值80时,经( )次比较后查找成功。
①  A.4
②  B.2
③  C.3
④  D.5
随机题目
【单选题】 I pulled the handle ____ I could.
①  so hardly as
②  as hardly as
③  so hard as
④  as hard as
【单选题】 She seems to be too short for a____.
①  twenty-year old girl
②  girl twenty-year-old
③  twenty-years-old girl
④  girl of twenty
【单选题】 He can come any day ____ Friday.
①  besides
②  but
③  on
④  in
【单选题】 I seem to have met you ____.
①  some time
②  ago
③  yet
④  before
【单选题】 Mary regretted not ____ to John’s birthday party last Sunday.
①  going
②  to go
③  having been going
④  to be going
【单选题】 26. We regret to inform you that the materials you ordered are out of____ .
①  work
②  reach
③  practice
④  stock
【单选题】 It’s no use just telling me to do it. Suggest some ____ ways to do it.
①  positive
②  belief
③  attitudes
④  shapes
【单选题】 As a result of the unfavorable working conditions, the project has to be put off ____ .
①  temporarily
②  tremendously
③  traditionally
④  typically
【单选题】 11. I prefer ____ dinner when we arrive there.
①  having
②  to have
③  taking
④  to take
【单选题】 As a teacher of elementary school, you should be patient ____ those pupils.
①  of
②  with
③  for
④  at