Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 MCQs Stacks and Queues

CSE205 — Data Structures And Algorithms 50 questions. Pick an option to check it.

Read the notes

0 of 50 answered 0 right 0 wrong , 50 left

  1. Question 1 of 50

    Which data structure follows the LIFO (Last In First Out) principle?

  2. Question 2 of 50

    In a stack implemented using an array of size N, what is the condition for stack overflow?

  3. Question 3 of 50

    What is the time complexity of the push operation in a stack implemented using an array?

  4. Question 4 of 50

    Which operation removes the top element from the stack?

  5. Question 5 of 50

    In a linked list representation of a stack, where are elements pushed and popped from?

  6. Question 6 of 50

    What happens if you try to pop an element from an empty stack?

  7. Question 7 of 50

    Which pointer is used to track the last element added to a stack?

  8. Question 8 of 50

    What is the result of evaluating the postfix expression: 5 3 + 2 * ?

  9. Question 9 of 50

    Another name for Reverse Polish Notation (RPN) is:

  10. Question 10 of 50

    Convert the infix expression (A + B) * C into postfix.

  11. Question 11 of 50

    Which data structure is primarily used to convert infix expressions to postfix expressions?

  12. Question 12 of 50

    In Polish notation (Prefix), where is the operator placed?

  13. Question 13 of 50

    What is the prefix form of the expression: A + B * C ?

  14. Question 14 of 50

    When evaluating a postfix expression, what do you do when you encounter an operand?

  15. Question 15 of 50

    Which operator has the highest precedence among the following?

  16. Question 16 of 50

    The associativity of the exponentiation operator (^) is usually:

  17. Question 17 of 50

    Which data structure follows the FIFO (First In First Out) principle?

  18. Question 18 of 50

    The operation of adding an element to a queue is called:

  19. Question 19 of 50

    In an array implementation of a simple queue, which pointers are maintained?

  20. Question 20 of 50

    What is the initial value of Front and Rear in an empty queue (array implementation)?

  21. Question 21 of 50

    In a linear queue array implementation, a queue is empty when:

  22. Question 22 of 50

    What is the major drawback of a simple linear queue implemented with an array?

  23. Question 23 of 50

    Which data structure resolves the memory wastage issue of a linear queue?

  24. Question 24 of 50

    In a Circular Queue of size N, the condition for the queue being full is:

  25. Question 25 of 50

    In a linked list implementation of a queue, where is the Enqueue operation performed?

  26. Question 26 of 50

    What is the time complexity for Dequeue operation in a linked list implementation (assuming a head pointer)?

  27. Question 27 of 50

    A queue where elements are removed based on a specific value rather than arrival time is called:

  28. Question 28 of 50

    Which data structure is most efficient for implementing a Priority Queue?

  29. Question 29 of 50

    In an Ascending Priority Queue, which element is removed first?

  30. Question 30 of 50

    What does 'Deque' stand for?

  31. Question 31 of 50

    What is a characteristic feature of a Deque?

  32. Question 32 of 50

    An Input-Restricted Deque allows:

  33. Question 33 of 50

    An Output-Restricted Deque allows:

  34. Question 34 of 50

    If you implement a Stack using two Queues, what is the cost of the Push operation usually made to be?

  35. Question 35 of 50

    Which of the following is an application of a Stack?

  36. Question 36 of 50

    Which of the following is an application of a Queue?

  37. Question 37 of 50

    The Peek operation in a Stack:

  38. Question 38 of 50

    In a linked list implementation of a stack, pushing an element requires allocating a new node and:

  39. Question 39 of 50

    For a queue implemented with a linked list, if Front == NULL, it means:

  40. Question 40 of 50

    In the array representation of a circular queue, how do you calculate the next position for Rear?

  41. Question 41 of 50

    Evaluate the prefix expression: - + 7 * 4 5 + 2 0

  42. Question 42 of 50

    What is the result of converting A * (B + C) to postfix?

  43. Question 43 of 50

    Which data structure supports the 'undo' feature in text editors?

  44. Question 44 of 50

    To reverse a string using a stack, you would:

  45. Question 45 of 50

    In a priority queue, if two elements have the same priority, how are they typically processed?

  46. Question 46 of 50

    How many stacks are needed to implement a Queue efficiently?

  47. Question 47 of 50

    When transforming an infix expression to postfix, if the scanned operator has lower precedence than the stack top operator:

  48. Question 48 of 50

    In a Deque implemented using a circular array, if Front = 0 and we do deleteFront, what is the new Front?

  49. Question 49 of 50

    Which operation is NOT valid for a standard Stack?

  50. Question 50 of 50

    What is the minimum number of queues needed to implement a Stack?

That's unit 3

Answer a few questions and your score shows up here.