Data Structures FINAL

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

8. A queue is __________ A) FIFO B) LIFO C) FILO D) LOFI

A) FIFO

9. Which of the following names does not relate to stacks? A) FIFO lists B) LIFO lists C) Piles D) Push down lists

A) FIFO lists

5. New nodes are added to the _________ of the queue A) Front B) Back C) Middle D) Both A and B

A) Front

2. In linked list representation of stack ________ holds the elements of the stack A) INFO fields B) TOP fields C) LINK fields D) NULL fields

A) INFO fields

16. Stack follows the strategy of __________ A) LIFO B) FIFO C) LRU D) RANDOM

A) LIFO

3. _________ form of access is used to add or remove nodes from a stack A) LIFO B) FIFO C) Both a and b D) None of these

A) LIFO

15. __________ is the term used to insert an element into stack A) Push B) Pull C) Pop D) Pump

A) Push

13. The elements of a stack are removed in _________ order A) Reverse B) Hierarchical C) Alternative D) Sequential

A) Reverse

7. What happens when you push a new node onto a stack? A) The new node is placed at the front of the linked list B)The new node is placed at the back of the linked list C) The new node is placed in the middle of the linked list D) No changes happen

A) The new node is placed at the front of the linked list

19. A pointer variable which contains the location at the top element of the stack is called _________ A) Top B) Last C) Final D) End

A) Top

18. Deletion operator is done using _________ in a queue A) front B) rear C) top D) list

A) front

26. A binary search tree is generated by inserting the following integers in order: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24 The number of the nodes in the left sub-tree and right sub-tree respectively is: A) (4,7) B) (7,4) C) (8,3) D (3,8)

B) (7,4)

6. In linked representation of the stack the null pointer of the last node in the list signals _________ A) Beginning of the stack B) Bottom of the stack C) Middle of the stack D) In between some value

B) Bottom of the stack

1. ________ form of access is used to add and remove nodes from a queue. A) LIFO B) FIFO C) Both a and b D) None of these

B) FIFO

23. Which type of traversal of binary search tree outputs the value in sorted order? A) Pre-order B) In-order C) Post-order D) None

B) In-order

25. If a node having two children is to be deleted from the binary search tree, it is replaced by its A) In-order predecessor B) In-order successor C) Pre-order predecessor D) None

B) In-order successor

10. The retrieval of items in a stack is called the _________ operation A) push B) pop C) retrieval D) access

B) pop

14. The insertion operation in the stack is called A) insert B) push C) pop D) top

B) push

22. Suppose we have numbers between 1 and 1000 in a binary search tree and want to search for the number 363. Which of the following sequences could not be the sequence of the node examined? A) 2, 252, 401, 398, 330, 344, 397, 363 B) 924, 220, 911, 244, 898, 258, 362, 363 C) 925, 202, 911, 240, 912, 245, 258, 363 D) 2, 399, 387, 219, 266, 382, 381, 278, 363

C) 925, 202, 911, 240, 912, 245, 258, 363

24. In the full binary search tree every internal node has exactly two children. If there are 100 leaf nodes, how many internal nodes are in the tree? A) 25 B) 49 C) 99 D) 101

C) 99

21. Which of the following statements about binary trees is CORRECT? A) Every binary tree is either complete or full B) Every complete binary tree is also a full binary tree C) Every full binary tree is also a complete binary tree D) A binary tree cannot be both full and complete

C) Every full binary tree is also a complete binary tree

17. _________ is the term used to delete an element from the stack A) Push B) Pull C) Pop D) Pump

C) Pop

4. In the linked representation of the stack _________ behaves as the top pointer variable to stack A) Stop pointer B) Begin pointer C) Start pointer D) Avail pointer

C) Start pointer

12. Which is the pointer associated with the stack? A) FIRST B) FRONT C) TOP D) REAR

C) TOP

11. The term push and pop relate to A) an array B) a list C) a stack D) a tree

C) a stack

20. Which of the following is an application of the stack? A) finding factorial B) tower of Hanoi C) infix to postfix D) all of the above

D) all of the above


Set pelajaran terkait

AP Psychology - ULTIMATE AP REVIEW

View Set

Abeka Grade 5 Old World History Quiz 13

View Set