Computer Algorithms Questions & Answers - Set 04 - ObjectiveBooks

Computer Algorithms Questions & Answers - Set 04

Practice Test: Question Set - 04


1. Which of the following is not the type of queue?
    (A) Ordinary queue
    (B) Single ended queue
    (C) Circular queue
    (D) Priority queue

2. A ________ is an acyclic digraph, which has only one node with in-degree 0, and other nodes have in-degree 1.
    (A) Directed tree
    (B) Undirected tree
    (C) Dis-joint tree
    (D) Direction oriented tree

3. Which of the following are the operations applicable a primitive data structures?
    (A) Create
    (B) Destroy
    (C) Update
    (D) All of the above

4. Linear arrays are also called ________
    (A) Straight line array
    (B) One-dimensional array
    (C) Vertical array
    (D) Horizontal array

5. A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called ________
    (A) AVL tree
    (B) Redblack tree
    (C) Lemma tree
    (D) None of the above

6. _________ is a pile in which items are added at one end and removed from the other.
    (A) Stack
    (B) Queue
    (C) List
    (D) None of the above

7. Herder node is used as sentinel in ________
    (A) Graphs
    (B) Stacks
    (C) Binary tree
    (D) Queues

8. State True or False.
    (i) Binary search is used for searching in a sorted array.
    (ii) The time complexity of binary search is O(logn).
    (A) True, False
    (B) False, True
    (C) False, False
    (D) True, True

9. In general, the binary search method needs no more than ________ comparisons.
    (A) [log2n] - 1
    (B) [logn] + 1
    (C) [log2n]
    (D) [log2n] +1

10. When new data are to be inserted into a data structure, but there is not available space; this situation is usually called ________
    (A) Underflow
    (B) Overflow
    (C) Houseful
    (D) Saturated

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests: