【单选题】【消耗次数:1】
对于顺序存储的有序表(5,12,20,26,37,42,46,50,64),若采用折半查找,则查找元素26的比较次数为( )。
2
3
4
5
参考答案:
复制
纠错
相关题目
【单选题】 对于长度为18的顺序存储的有序表,若采用折半查找,则查找第15个元素的比较次数为( )。
①  3
②  4
③  5
④  6
【单选题】 对于长度为9的顺序存储的有序表,若采用折半查找,在等概率情况下的平均查找长度为( )的9分之一。
①  20
②  18
③  25
④  22
【单选题】 有一个长度为11的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为( )。
①  A.29/11
②  B.33/11
③  C.26/11
④  D.30/11
【单选题】 对具有n个元素的有序表采用折半查找,则算法的时间复杂度为( )。
①  O(n)
②  O(n的平方)
③  O(1)
④  O(log2(n))
【单选题】 有一个长度为8的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为( )。
①  A.22/8
②  B.20/8
③  C.23/8
④  D.21/8
【单选题】 有一个长度为7的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为( )。
①  A.17/7
②  B.18/7
③  C.21/7
④  D.20/7
【单选题】 在有序表{10,14,34,43,47,64,75,80,90}中,用折半查找法查找值80时,经( )次比较后查找成功。
①  A.4
②  B.2
③  C.3
④  D.5
【判断题】 有一个长度为10的有序表,按折半查找对该表进行查找,在等概率情况下查找成功的平均比较次数为29/10。
①  正确
②  错误
【判断题】 线性表只要以关键字有序的顺序方式存储就能进行折半查找。
①  正确
②  错误
【单选题】 采用顺序查找方法查找长度为n的线性表时,每个元素的平均查找长度为( )。
①  A.n
②  B.n/2
③  C.(n+1)/2
④  D.(n-1)/2
随机题目
【单选题】 A: Its getting late. Im afraid I must be going now. B: Ok. [填空].
①  See you
②  Take it easy
③  Go slowly
④  Stay long
【单选题】 A: [填空]? B: Do you have a doll?
①  What do you want to sell
②  Shall I help you
③  Do you like a doll
④  What can I do for you
【单选题】 A: Im having a barbecue next Saturday. [填空]. B: Sure. That would be wonderful. What time?
①  I have invited some of my friends to come
②  Will you be free at that time?
③  Im looking forward to it
④  I was wondering if youd like to come
【单选题】 A: Ive got your invitation. B: Oh, good. [填空]
①  Thanks a lot.
②  Ill take it.
③  Can you come?
④  May I help you?
【单选题】 A: Would you mind if I turned the radio off? B: [填空].
①  Yes, please
②  No, go right ahead
③  Yes, thats all right
④  No, thank you
【单选题】 A: Would you like some wine? B: Yes, just [填空].
①  little
②  very little
③  a little
④  little bit
【单选题】 A: Would you like another cup of tea? B: Ive enough. [填空].
①  I would eat anything
②  Thank you by the way
③  Thank you all the same
④  No, anything will do
【单选题】 A: How far is the airport from here? B: [填空].
①  You can take a taxi
②  Ill fly to Paris
③  Its only six hundred dollars
④  Its about thirty miles
【单选题】 A: Excuse me, how much is the dress? B: Its €100. [填空]
①  Which do you prefer?
②  Oh, no. Thats OK!
③  How do you like it?
④  Would you like to try it on?
【单选题】 A: Bring me the bill, please. B: [填空].
①  You are welcome
②  Ill hurry up
③  Please wait for a moment, sir
④  Be quick