Wednesday, May 29, 2013

Data Structure MCQ Test – 1

Que.1. Can linked list be implemented using arrays?
A.    Yes
B.    No

Right Answer: A

Que.2. On which principle does stack work?
A.    FILO
B.    FIFO
C.    LILO
D.    Both a and c above

Right Answer: A

Que.3. An empty list is the one which has no
A.    nodes
B.    data
C.    both a and b above
D.    address

Right Answer: C

Que.4. In a heap, element with the greatest key is always in the ______________ node
A.    leaf
B.    root
C.    first node of left sub tree
D.    first node of right sub tree

Right Answer: B

Que.5. A _____________ tree is tree where for each parent node, there is only one associated child node
A.    balanced binary tree
B.    rooted complete binary tree
C.    complete binary tree
D.    degenerate tree

Right Answer: D

Que.6. Items in a priority queue are entered in a _______________ order
A.    random
B.    order of priority
C.    as and when they come
D.    none of the above

Right Answer: A

Que.7. A tree cannot contain cycles
A.    False
B.    True

Right Answer: B

Que.8. In graphs, A hyperedge is an edge that is allowed to take on any number of _____________
A.    Vertices
B.    Edges
C.    Both a and b above
D.    Labels

Right Answer: B

Que.9. Key value pairs is usually seen in
A.    Hash tables
B.    Heaps
C.    Both a and b
D.    Skip list

Right Answer: A

Que.10. Breadth First Search is used in
A.    Binary trees
B.    Stacks
C.    Graphs
D.    Both a and c above

Right Answer: C

Que.11. Which of the following ways below is a pre order traversal?
A.    Root->left sub tree->right sub tree
B.    Root-> right sub tree ->left sub tree
C.    right sub tree->left sub tree->Root
D.    left sub tree->right sub tree->Root

Right Answer: A

Que.12. What is the pecularity of red blac trees?
A.    In red-black trees, the root do not contain data.
B.    In red-black trees, the leaf nodes are not relevant and do not contain data.
C.    In red-black trees, the leaf node are relevant but do not contain data.
D.    Both a and c above

Right Answer: B

Que.13. AVL trees have a faster ________________
A.    Insertion
B.    Deletion
C.    Updation
D.    Retrival

Right Answer: D

Que.14. Which of the following statements hold true for binary trees?
A.    The left subtree of a node contains only nodes with keys less than the node’s key
B.    The right subtree of a node contains only one nodes with key greater than the node’s key.
C.    Both a and b above
D.    Noth left and right subtree nodes contains only nodes with keys less than the node’s key

Right Answer: C

Que.15. Which of the following linked list below have last node of the list pointing to the first node?
A.    circular doubly linked list
B.    circular linked list
C.    circular singly linked list
D.    doubly linked list

Right Answer: C

Que.16. Which of the following ways below is a In order traversal?
A.    Root->left sub tree->right sub tree
B.    Root-> right sub tree ->left sub tree
C.    right sub tree->left sub tree->Root
D.    left sub tree->right sub tree->Root

Right Answer: D

Que.17. Can stack be describe as a pointer?
A.    Yes
B.    No

Right Answer: A

Que.18. The time required in best case for search operation in binary tree is
A.    O(n)
B.    O(log n)
C.    O(2n)
D.    O(log 2n)

Right Answer: B

Que.19. In ______________ tree, the heights of two child subtree of any node differ by at most one
A.    Binary tree
B.    Red black tree
C.    Splay tree
D.    AVL tree

Right Answer: D

2 comments:

  1. the answer of question number 16 is wrong.
    correct answer for this is: left, root and then right

    ReplyDelete
  2. que. 16 ans is wrong.
    correct answer is: left-root-right

    ReplyDelete