BPSC TRE 4 DSA Practice set 2 02nd December 2026 Share On Que: (1). Which one of the following is not the application of the stack data structure? Backtracking C. String reversal B. Asynchronous data transfer A. More than one of the above D. None of the above E. Check Answer Open question page Que: (2). Which principle is followed by a stack data structure? FIFO A. LIFO B. LILO C. More than one of the above D. None of the above E. Check Answer Open question page Que: (3). Which operation is used to insert an element into a stack? Peek B. Push C. Pop A. More than one of the above D. None of the above E. Check Answer Open question page Que: (4). What is the condition called when an element is removed from an empty stack? Underflow B. Collision C. Overflow A. More than one of the above D. None of the above E. Check Answer Open question page Que: (5). What is the time complexity of the push and pop operations in a stack implemented using an array? O(log n) C. O(1) A. O(n) B. More than one of the above D. None of the above E. Check Answer Open question page Que: (6). Which data structure is primarily used to evaluate a postfix expression? Queue A. Stack C. Tree B. More than one of the above D. None of the above E. Check Answer Open question page Que: (7). Which data structure is used by a program to manage function calls and recursion? Stack B. Graph C. Queue A. More than one of the above D. None of the above E. Check Answer Open question page Que: (8). Which operation returns the top element of a stack without removing it? Pop B. Peek C. Push A. More than one of the above D. None of the above E. Check Answer Open question page Que: (9). Which data structure is commonly used to check whether parentheses are balanced in an expression? Stack C. Linked List B. Queue A. More than one of the above D. None of the above E. Check Answer Open question page Que: (10). In an array-based stack, which variable generally indicates the position of the topmost element? Top C. Rear B. Front A. More than one of the above D. None of the above E. Check Answer Open question page Que: (11). Which of the following is the prefix form of A+B*C? +A*BC A. ABC+* B. +AB*C C. More than one of the above D. None of the above E. Check Answer Open question page Que: (12). Which of the following is the postfix form of A+B*C? *+ABC C. AB+C* A. ABC*+ B. More than one of the above D. None of the above E. Check Answer Open question page Que: (13). Which notation places the operator between its operands? Infix C. Postfix B. Prefix A. More than one of the above D. None of the above E. Check Answer Open question page Que: (14). What is the postfix expression of (A+B)*C? AB+C* A. ABC+* B. *+ABC C. More than one of the above D. None of the above E. Check Answer Open question page Que: (15). What is the prefix expression of (A+B)*C? AB+C* C. *+ABC A. +*ABC B. More than one of the above D. None of the above E. Check Answer Open question page Que: (16). What is the postfix form of A-B/C? ABC-/ C. AB-C/ A. ABC/- B. More than one of the above D. None of the above E. Check Answer Open question page Que: (17). Which operator has the highest precedence among the following in standard arithmetic expressions? + A. - B. * C. More than one of the above D. None of the above E. Check Answer Open question page Que: (18). What is the prefix form of A*B+C? +*ABC A. *+ABC B. *AB+C C. More than one of the above D. None of the above E. Check Answer Open question page Que: (19). Which of the following is the infix form of the prefix expression *+AB-CD? (A+B)*(C-D) A. (A+B)*C-D C. (A*B)+(C-D) B. More than one of the above D. None of the above E. Check Answer Open question page Que: (20). What is the value of the postfix expression 5 3 2 * +? 13 C. 11 A. 16 B. More than one of the above D. None of the above E. Check Answer Open question page Que: (21). Which data structure is required to convert the infix to prefix notation? Queue A. Stack B. Linked list C. More than one of the above D. None of the above E. Check Answer Open question page Que: (22). Which data structure is generally used to implement Depth First Search (DFS)? Priority Queue C. Queue A. Stack B. More than one of the above D. None of the above E. Check Answer Open question page Que: (23). What is the maximum number of elements that can be removed from a stack containing N elements without performing any push operation? N B. N+1 C. N-1 A. More than one of the above D. None of the above E. Check Answer Open question page Que: (24). Which of the following statements is true about a stack implemented using a linked list? It follows FIFO principle C. It can grow dynamically B. It has a fixed size A. More than one of the above D. None of the above E. Check Answer Open question page Que: (25). If the elements A, B, C and D are pushed onto a stack in this order, which element will be popped first? B B. A A. D C. More than one of the above D. None of the above E. Check Answer Open question page Que: (26). Which of the following is the main advantage of a stack over a queue? It always requires less memory C. It follows FIFO order A. It provides Last In First Out access B. More than one of the above D. None of the above E. Check Answer Open question page Que: (27). What is the time complexity of searching for an arbitrary element in an unsorted stack? O(log n) B. O(1) A. O(n) C. More than one of the above D. None of the above E. Check Answer Open question page Que: (28). Which of the following is the correct postfix expression for (A-B)/(C+D)? AB/CD+- C. AB-CD+/ A. AB-C+D/ B. More than one of the above D. None of the above E. Check Answer Open question page Que: (29). What is the minimum number of stacks required to implement a queue? 1 A. 2 B. 3 C. More than one of the above D. None of the above E. Check Answer Open question page Que: (30). Which of the following conditions indicates that an array-based stack is full when using zero-based indexing? TOP = 0 A. TOP = MAX - 1 B. TOP = -1 C. More than one of the above D. None of the above E. Check Answer Open question page Que: (31). Which of the following highly uses the concept of an array? Binary search tree A. Spatial locality C. Scheduling of processes B. More than one of the above D. None of the above E. Check Answer Open question page Que: (32). In which memory location are the elements of a one-dimensional array generally stored? Random memory locations B. Only CPU registers C. Contiguous memory locations A. More than one of the above D. None of the above E. Check Answer Open question page Que: (33). What is the time complexity of accessing an element in an array using its index? O(log n) B. O(1) C. O(n) A. More than one of the above D. None of the above E. Check Answer Open question page Que: (34). Which searching algorithm is most suitable for a sorted array? Depth First Search C. Binary search B. Linear search A. More than one of the above D. None of the above E. Check Answer Open question page Que: (35). What is the worst-case time complexity of inserting an element at the beginning of an array containing N elements? O(log n) B. O(1) A. O(n) C. More than one of the above D. None of the above E. Check Answer Open question page Que: (36). Which formula represents the address of the element A[i] in a zero-based one-dimensional array? Base + (i - 1) * w B. Base + i * w A. Base + i + w C. More than one of the above D. None of the above E. Check Answer Open question page Que: (37). Which of the following is a major disadvantage of a static array? Contiguous memory allocation C. Fixed size B. Direct element access A. More than one of the above D. None of the above E. Check Answer Open question page Que: (38). Which data structure is commonly used to implement a matrix? Stack B. Queue C. Array A. More than one of the above D. None of the above E. Check Answer Open question page Que: (39). What is the time complexity of traversing all elements of a one-dimensional array containing N elements? O(log n) B. O(n) C. O(1) A. More than one of the above D. None of the above E. Check Answer Open question page Que: (40). Which of the following techniques is used to reduce the time required for searching an element in a sorted array? Binary search B. Bubble sort C. Sequential scanning A. More than one of the above D. None of the above E. Check Answer Open question page