BPSC TRE 4 DSA Practice set 2

Que: (1). Which one of the following is not the application of the stack data structure?

C.
B.
A.
D.
E.
Open question page

Que: (2). Which principle is followed by a stack data structure?

A.
B.
C.
D.
E.
Open question page

Que: (3). Which operation is used to insert an element into a stack?

B.
C.
A.
D.
E.
Open question page

Que: (4). What is the condition called when an element is removed from an empty stack?

B.
C.
A.
D.
E.
Open question page

Que: (5). What is the time complexity of the push and pop operations in a stack implemented using an array?

C.
A.
B.
D.
E.
Open question page

Que: (6). Which data structure is primarily used to evaluate a postfix expression?

A.
C.
B.
D.
E.
Open question page

Que: (7). Which data structure is used by a program to manage function calls and recursion?

B.
C.
A.
D.
E.
Open question page

Que: (8). Which operation returns the top element of a stack without removing it?

B.
C.
A.
D.
E.
Open question page

Que: (9). Which data structure is commonly used to check whether parentheses are balanced in an expression?

C.
B.
A.
D.
E.
Open question page

Que: (10). In an array-based stack, which variable generally indicates the position of the topmost element?

C.
B.
A.
D.
E.
Open question page

Que: (11). Which of the following is the prefix form of A+B*C?

A.
B.
C.
D.
E.
Open question page

Que: (12). Which of the following is the postfix form of A+B*C?

C.
A.
B.
D.
E.
Open question page

Que: (13). Which notation places the operator between its operands?

C.
B.
A.
D.
E.
Open question page

Que: (14). What is the postfix expression of (A+B)*C?

A.
B.
C.
D.
E.
Open question page

Que: (15). What is the prefix expression of (A+B)*C?

C.
A.
B.
D.
E.
Open question page

Que: (16). What is the postfix form of A-B/C?

C.
A.
B.
D.
E.
Open question page

Que: (17). Which operator has the highest precedence among the following in standard arithmetic expressions?

A.
B.
C.
D.
E.
Open question page

Que: (18). What is the prefix form of A*B+C?

A.
B.
C.
D.
E.
Open question page

Que: (19). Which of the following is the infix form of the prefix expression *+AB-CD?

A.
C.
B.
D.
E.
Open question page

Que: (20). What is the value of the postfix expression 5 3 2 * +?

C.
A.
B.
D.
E.
Open question page

Que: (21). Which data structure is required to convert the infix to prefix notation?

A.
B.
C.
D.
E.
Open question page

Que: (22). Which data structure is generally used to implement Depth First Search (DFS)?

C.
A.
B.
D.
E.
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?

B.
C.
A.
D.
E.
Open question page

Que: (24). Which of the following statements is true about a stack implemented using a linked list?

C.
B.
A.
D.
E.
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.
A.
C.
D.
E.
Open question page

Que: (26). Which of the following is the main advantage of a stack over a queue?

C.
A.
B.
D.
E.
Open question page

Que: (27). What is the time complexity of searching for an arbitrary element in an unsorted stack?

B.
A.
C.
D.
E.
Open question page

Que: (28). Which of the following is the correct postfix expression for (A-B)/(C+D)?

C.
A.
B.
D.
E.
Open question page

Que: (29). What is the minimum number of stacks required to implement a queue?

A.
B.
C.
D.
E.
Open question page

Que: (30). Which of the following conditions indicates that an array-based stack is full when using zero-based indexing?

A.
B.
C.
D.
E.
Open question page

Que: (31). Which of the following highly uses the concept of an array?

A.
C.
B.
D.
E.
Open question page

Que: (32). In which memory location are the elements of a one-dimensional array generally stored?

B.
C.
A.
D.
E.
Open question page

Que: (33). What is the time complexity of accessing an element in an array using its index?

B.
C.
A.
D.
E.
Open question page

Que: (34). Which searching algorithm is most suitable for a sorted array?

C.
B.
A.
D.
E.
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?

B.
A.
C.
D.
E.
Open question page

Que: (36). Which formula represents the address of the element A[i] in a zero-based one-dimensional array?

B.
A.
C.
D.
E.
Open question page

Que: (37). Which of the following is a major disadvantage of a static array?

C.
B.
A.
D.
E.
Open question page

Que: (38). Which data structure is commonly used to implement a matrix?

B.
C.
A.
D.
E.
Open question page

Que: (39). What is the time complexity of traversing all elements of a one-dimensional array containing N elements?

B.
C.
A.
D.
E.
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?

B.
C.
A.
D.
E.
Open question page