PGD201 Data Structure & Algorithm

PGD201 Data Structure & Algorithm

 

 

Data Structure MCQ Test

Q1. Can linked list be implemented using arrays?
A.    Yes
B.    NoRight Answer: A

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

Right Answer: A

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

Right Answer: C

Q4. 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

Q5. 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

Q6. 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

Q7. A tree cannot contain cycles
A.    False
B.    True

Right Answer: B

Q8. 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

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

Right Answer: A

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

Right Answer: C

Q11. 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

Q12. 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

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

Right Answer: D

Q14. 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

Q15. 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

Q16. 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

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

Right Answer: A

Q18. 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

Q19. 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

Please Login to Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: