题目内容

5 In the following program segment, the frequency of the assignment statement for x is ( ). FOR i:=1 TO n DO FOR j:=1 TO n DO x:=x+1;

A. O(2n)
B. O(n)
C. O(n^2)
D. O(log2n)

查看答案
更多问题

1. Which of the following is the advantage of sequential storage structure ().

A. high storage density
B. easy to insert
C. easy to delete
D. It can be easily used for storage representation of various logical structures

2. The error in the following description of the linear table is ().

A. The linear table uses sequential storage ,which is easy to insertion and deletion.
B. The linear table uses sequential storage, and must occupy a continuous storage unit.
C. The linear table uses linked storage, which does not need to occupy a continuous storage unit.
D. The linear table uses linked storage, which is easy to insert and delete.

3. If the most common operation of a linear table is to access any element with specified sequence number and insert and delete at the end of the operation, the () storage method is the most time-saving

A. sequence table
B. doubly linked list
C. doubly linked circular list with a head node
D. singly linked circular list

6. The most common operation for setting a linked list is to insert a node at the end and delete the tail node, so () is the most time-saving option.

A. doubly linked circular list with a head node
B. singly linked list
C. singly linked circular list with a tail pointer
D. singly linked circular list

答案查题题库