【单选题】【消耗次数:1】
设有一个长度为20的顺序表,要在第5个元素之前插入1个元素(也就是插入元素作为新表的第5个元素),则移动元素个数为( )。
A.15
B.16
C. 5
D.4
参考答案:
复制
纠错
相关题目
【单选题】 设有一个长度为18的顺序表,要在第6个元素之前插入一个元素(也就是插入元素作为新表的第6个元素),则移动元素个数为( )。
①  A.12
②  B.5
③  C. 13
④  D.6
【单选题】 设有一个长度为28的顺序表,要在第12个元素之前插入一个元素(也就是插入元素作为新表的第12个元素),则移动元素个数为( )。
①  A.12
②  B.17
③  C. 13
④  D.11
【单选题】 设有一个长度为22的顺序表,要删除第8个元素需移动元素的个数为( )。
①  A.15
②  B.22
③  C.14
④  D.23
【单选题】 设有一个长度为32的顺序表,要删除第8个元素需移动元素的个数为( )。
①  A.9
②  B.8
③  C.25
④  D.24
【判断题】 设有一个长度为25的顺序表,第8号元素到第25号元素依次存放的值为8,9,10,11,…25, 某人想要在第8个元素前插入1个元素7(也就是插入元素作为新表的第8个元素),他的做法是从第8号元素开始,直到第25号元素依次向后移动1个位置,然后把7存放在8号位置,其结果是新表中第25号元素的值为8。
①  正确
②  错误
【单选题】 在一个长度为n的顺序表中,若要在第i(1≤i≤n)个元素前插入一个元素时,则需向后移动( )个元素。
①  n-i+1
②  n-i-1
③  n-i
④  i
【判断题】 设有一个长度为n的顺序表,要删除第i个元素需移动元素的个数为n-i。
①  正确
②  错误
【单选题】 在一个长度为n的顺序表中向第i个元素(0< i<n+l )之前插入一个新元素时,需向后移动( )个元素。
①  n-i
②  n-i+l
③  n-i-1
④  i
【判断题】 设顺序存储的线性长度为n,要在第i个元素之前插入一个新元素,按课本的算法当i= 1时,移动元素次数为2.
①  正确
②  错误
【单选题】 在一个长度为n的顺序存储线性表中,向第i个元素(1£ i£n)之前插入一个新元素时,需要依次后移( )个元素。
①  A.n-i
②  B.n-i+1
③  C.n-i-1
④  D.i
随机题目
【单选题】 2. I was told yesterday that the company ______ me to Rome next week for a business conference.
①  should have sent
②  was going to send
③  should be sending
④  should send
【单选题】 17.Neither of them ____ the snake.
①  dares catches
②  dare to catch
③  dare catching
④  dare catch
【单选题】 12.You _____ return the book now. You can keep it till next week if you like.
①  cant
②  mustnt
③  neednt
④  may not
【单选题】 6. –Look, someone is coming. Guess who it _____ be?–I think it _____ be Tom.–I don’tthink it _____ be _____.
①  must; can; must; his
②  may; can; must; him
③  must; can; him
④  might; must; can; himself
【单选题】 1. If they ______ to do this work, he might do it some other way.
①  were
②  should
③  will
④  can
【单选题】 8. I______ go to bed until I ______ finished my work last night.
①  Don’t; had
②  didn’t have
③  didn’t; had
④  don’t; have
【单选题】 15.Man _____ die without air or water.
①  will
②  have to
③  must
④  should
【单选题】 16.Let’sclean our classroom, ______?
①  will you
②  dont we
③  shall we
④  do you
【单选题】 7. If it is fine tomorrow, we ______ a football match.
①  have
②  will have
③  has
④  shall has
【单选题】 19. _______hand in his exercise book before Monday.
①  Need he to
②  Does he need
③  Needs he to
④  Need he