Type Here to Get Search Results !

[ BEST ] Data Structure MCQ Questions and Answers [ SET - 2 ] | Data Structure Mcq Online Test with Answers

 

Data Structure Mcq Online Test with Answers

1. Which of the following data structure is linear type?

     strings
     stack
    queue
ANSWER= (D) all of these

 

2. The depth of a complete binary tree with ‘n’ nodes is (log is to the base two)A

    log (n+1)- 1
    log (n)
    log (n-1) +1
ANSWER= (A)log (n+1)- 1

 

3.  A linear list in which elements can be added or removed at either end but not in the middle is known as 

    queue 
    deque
    stack
ANSWER= (B) deque

 

4. The number of binary relation on a set with n element is

     n2
    2n
    2n2
ANSWER= (C) 2n2

 

5. A data structure in which linear sequence is maintained by pointers is known as

    Array
    Stack
    Linked list
ANSWER= (C) Linked list

 

6.  A dequeue operation removes an element

    From the front of the queue
    From any place in the queue
    From the rear of the queue
ANSWER= (A) From the front of the queue

 

7. Stack is ____ type of data structure.

    lifo
    fifo
     both a & b
ANSWER= (A) lifo

 

8. The prefix expression for the infix expression a (b + c) / e-f is 

     /'a + bc-ef 
    -/+ abcef
    -/'a + bcef
ANSWER= (A)  /'a + bc-ef 

 

9. Worst space complexity of singly linked list is

     o(n)
     o(1)
    o(log(n))
ANSWER= (A)  o(n)

 

10. What is the minimum number of nodes in a complete binary tree with depth 3?





ANSWER= (A) 4

 

11. The number of stacks required to implement mutual recursion is




ANSWER= (A) 1

 

12.When is insertion sort a good choice for sorting an array?

    The array has only a few elements out of place
     Each element of array requires a small amount of memory
    The processor speed is fast
ANSWER= (A) The array has only a few elements out of place

 

13. Pseudocode is a representation of the code required for ___.

    A Program
    An Algorithm
    A single Instruction
ANSWER= (A) A Program

 

14. Priority queue can be implemented using

    array 
     linked list
    heap
ANSWER= (D) all of these

 

15. Which is better computing time (in the analysis of algorithm)?

    O (N)
    O (N)2
    O (logN)
ANSWER= (C) O (logN)

 

16. Name the tree in which, for every node, the height of left sub tree and height of right sub tree can differ by at most one

    AVL tree
     B-tree
    Threaded tree
ANSWER= (A) AVL tree

 

17. Reserve Polish notation is often known as

    Infix 
    Prefix
    Postfix
ANSWER= (C) Postfix

 

18. Which of the following tree maintains a list of the keys in sequential order?

    B+-tree
    B*-tree
    B-tree
ANSWER= (A) B+-tree

 

19. Which of the following data structure is more appropriate to represent a heap?

     Two-dimensional array
    Doubly linked list
    Linear Array
ANSWER= (C) Linear Array

 

20. The evaluation of the postfix expression 3, 5, 7,*, +, 12, % is 

     2



ANSWER= (A) 2

 

21. If two trees have same structure and node content, then they are called ____

    Synonyms trees
    Joint trees
    Equivalent trees
ANSWER= (C) Equivalent trees

 

22. What is the worst case time for quick sort to sort an array of n elements?

     0(n)
    0(nlog2n)
    0(log2n)
ANSWER= (D) 0(log2n)

 

23. The operation for adding an entry to a stack is traditionally called 

    Add 
    Append 
     Insert
ANSWER= (D) Push

 

24. Process of inserting an element in stack is called __

     Push
    Evaluation
    Pop
ANSWER= (A) Process of inserting an element in stack is called Push

 

25. A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called ……

    avl tree
    red-black tree
     lemma tree
ANSWER= (D) none of the above

 

26. The best data structure to evaluate an arithmetic expression in postfix form is

     Queue 
    Stack
    Tree
ANSWER= (B) Stack

 

27. In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively.

     0 and 1
     0 and -1
    -1 and 0
ANSWER= (B) 0 and -1

 

28. Which class in Java can be used to represent bit array?

    BitArray
    BitStream
    BitSet
ANSWER= (B) BitSet

 

29.  What will be the value of top, if there is a size of stack STACK_SIZE is 5





ANSWER= (C) 4

 

30. The heap (represented by an array) constructed from the list of numbers 30, 10, 80, 60, 15, 55, 17 is -

     60, 80, 55, 30, 10, 17, 15 
     80, 55, 60, 15, 10, 30, 17
    80, 60, 30, 17, 55, 15, 10:
ANSWER= (B) 80, 55, 60, 15, 10, 30, 17






Friends if you like this post,kindly comment bellow and do share your responce.Thank You for Visiting.

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Below Post Ad