DATA STRUCTURE AND ALGORITHMS MCQ GATE NET SET – 12


  1. Which of the following programming languages features require a stack-base allocation
    1. pointer
    2. Block-structure
    3. recursion
    4. dynamic scoping
  1. Push down stack or push down list is
    1. stack
    2. queue
    3. linked list
    4. dequeue
  1. Stack is useful for
    1. radix sort
    2. breadth first search
    3. recursion
    4. Heap sort
  2. Stacks can not be used to
    1. evaluate an arithmetic expression in postfix form
    2. implement recursion
    3. convert a given arithmetic expression in infix form to is equivalent postfix form
    4. allocates resources (like CPU) by the operating system
  1. Stack is useful for implementing
    1. radix sort
    2. breadth first search
    3. selection sort
    4. depth first search
  1. Which of the following is useful in implementing quick sort?
    1. stack
    2. set
    3. list
    4. queue
  1. Which of the following is essential for converting an infix expression to postfix form efficiently?
    1. An operator stack
    2. An operand stack
    3. An operator stack and an operand stack
    4. A parse tree
  1. A stack is most suitable to evaluate _ _ _ _ _ expression
    1. postfix
    2. prefix
    3. infix
    4. post & infix
  1. Linear linked data structure is
    1. tree
    2. graph
    3. stack
    4. binary tree
  2. A queue of characters currently contained a,b,c,d. What would be the contents of queue after the following operationDELETE, ADD W, ADD X, DELETE, ADD Y
    1. A,B,C,W,Y
    2. C,D,W,X,Y
    3. W,Y,X,C,D
    4. A,B,C,D,W
  1. Which of the following data structure is suitable for priority queue?
    1. Doubly linked list
    2. Circular queues
    3. Binary search
    4. Heaps
  1. For storing the sorted data on which often insert and deletion operations are performed, the following data structure is better
    1. Array
    2. queue
    3. linked-list
    4. doubly linked-list
  1. A circular queue of size N will sign queue full when the number of elements in the queue is
    1. N-1
    2. N
    3. N+1
    4. N-2
  1. The postfix equivalent of the prefix * + a b – c d is
    1. ab + cd – *
    2. ab cd + – *
    3. ab + cd * –
    4. ab + – cd *
  1. The postfix expression for the infix expressionA + B* (C+D) / F + D*E is:
    1. AB + CD + F / D + E*
    2. ABCD + * F / + DE*
    3. A*B + CD / F*DE ++
    4. A+ BCD / F* DE ++
  1. A telephone system which places cells to a particular number on hold can best represented by
    1. queue
    2. stack
    3. linked-list
    4. variable
  1. The performance of an algorithm is specified by the following notation that represents the worst case
    1. O-notation
    2. Omega notation
    3. Theta notation
    4. alpha-notation
  1. If front=rear ,then the queue is
    1. full
    2. empty
    3. unknown value
    4. 1/2 full
  1. Reverse polish expression is
    1. Infix
    2. postfix
    3. prefix
    4. post & prefix
  1. A list of integers is read in, one at a time, and a binary search tree is constructed. Next the tree is traversed and the integers are printed. Which traversed would result in a printout which duplicates the original order of the list of integers?
    1. pre-order
    2. post-order
    3. in-order
    4. in-fix order
  2. The postfix expression for the infix expression A + B* (C+D) / F + D*E is
    1. AB + CD + * F/D + E *
    2. ABCD + *F / + DE* +
    3. A*B + CD / F*DE ++
    4. A + *BCD / F*DE ++
  1. The equivalent of (a+bcd)*(e+f/d) in the post fix notation is
    1. ab+c↑d↑e &fd/
    2. abcd↑+↑efd/+*
    3. abcdefd/+*↑↑+
    4. abcd↑↑+efd/+*
  1. The infix form of the postfix expression ABC-/D*E+ is
    1. A/B-C*D+E
    2. A-B/C*D+E
    3. (A-B)/C*D+E
    4. A/(B-C)*D+E
  1. The postfix expression for the infix expression A/B*C+D*E is
    1. AB/C*DE*+
    2. ABC/*DE+*
    3. ABCD/*E+*
    4. ABC*/D*E+
  1. The prefix expression for the infix expressionA/B*C+D*E is
    1. AB/C*DE*+
    2. +*/ABC*DE
    3. +*AB/C*DE
    4. /+ABCDE
  1. Suffix expression is
    1. Infix
    2. postfix
    3. prefix
    4. post & prefix
  1. polish expression is
    1. infix
    2. postfix
    3. prefix
    4. post & prefix
  1. To convert an Infix expression into postfix we require
    1. stack
    2. queue
    3. linked list
    4. dequeue
  1. A stack is most suitable to evaluate _ _ _ _ _ _ _ expression
    1. postfix
    2. prefix
    3. infix
    4. post & infix
  1. The circular linked list have
    1. no beginning
    2. no ending
    3. beginning but no ending
    4. no beginning and no ending
  1. To insert a node at the beginning of the doubly linked list _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. Doubly linked list uses _ _ _ _ _ _ _ _ no.of pointers
    1. Zero
    2. One
    3. Two
    4. Three
  2. To insert a node at the beginning of the single linked list _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 0
  1. To insert a node at middle of the single linked list _ _ _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To insert a node at the end of the doubly linked list _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To insert a node at the end of the single linked list _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To delete the first node in single linked list _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To delete the last node in single linked list _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 0
  1. To delete the middle node in single linked list _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To delete an item in the middle of a circular doubly linked list, _ _ _ _ _ _ _ _ no.of points to be manipulated
    1. 2
    2. 4
    3. 6
    4. 8
  2. If storage class is missing in the array definition, by default it will be taken to be
    1. automatic
    2. external
    3. static
    4. either automatic or external depending on the place of occurrence
  1. To delete the last node in doubly linked list _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To delete the middle node in doubly linked list _ _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To insert an item in a circular doubly linked list, _ _ _ _ _ _ _ no.of points to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. Which of the following features of C is meant to provide reliable access to special memory
    1. static _ const
    2. pragma
    3. volatile
    4. immutable
  1. To insert a node at middle of the doubly linked list _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To delete the first node in doubly linked list _ _ _ _ _ _ _ _ no. of pointers to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. To insert an item in a circular single linked list _ _ _ _ _ _ _ _ _ no.of points to be manipulated
    1. 2
    2. 3
    3. 4
    4. 1
  1. To delete an item in a circular doubly linked list, _ _ _ _ _ _ _ _ no.of points to be manipulated
    1. 1
    2. 2
    3. 3
    4. 4
  1. A sorting technique is called stable if:
    1. it takes O ( n log n) time
    2. It maintains the relative order of occurrence of non-distinct elements
    3. It uses divide and conquer paradigm
    4. The maximum number of nodes in a binary tree of height h is (2-1)(The height of the root is reckoned as 0)

Leave a comment