BPSC TRE 4 DSA Practice set 1

Que: (1). Merge Sort is an example of which algorithm design paradigm?

Asked in BPSC TRE 3.0
C.
A.
B.
D.
E.
Open question page

Que: (2). What is the worst-case time complexity of Merge Sort?

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

Que: (3). What is the best-case time complexity of Merge Sort?

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

Que: (4). Which operation is mainly responsible for combining the sorted subarrays in Merge Sort?

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

Que: (5). Which recurrence relation represents the standard Merge Sort algorithm?

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

Que: (6). Which of the following sorting algorithms is based on the Divide and Conquer approach?

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

Que: (7). Which property is generally associated with the standard Merge Sort algorithm?

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

Que: (8). What is the typical auxiliary space complexity of the standard recursive Merge Sort for an array?

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

Que: (9). Which of the following is a major difference between Merge Sort and Quick Sort?

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

Que: (10). Which of the following problems is commonly solved using the Divide and Conquer technique?

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

Que: (11). Which of the following data structures stores elements in a non-linear relationship?

Asked in BPSC TRE 3.0
C.
A.
B.
D.
E.
Open question page

Que: (12). Which of the following is an example of a non-linear data structure?

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

Que: (13). Which of the following is a linear data structure?

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

Que: (14). Which data structure is primarily used to represent hierarchical relationships?

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

Que: (15). Which data structure is commonly used to represent a network of interconnected entities?

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

Que: (16). In a Binary Search Tree, where are values smaller than the root generally stored?

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

Que: (17). Which traversal of a Binary Search Tree produces elements in sorted order?

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

Que: (18). Which data structure follows the Last In, First Out principle?

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

Que: (19). Which data structure follows the First In, First Out principle?

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

Que: (20). Which data structure is commonly used to implement Breadth-First Search (BFS)?

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

Que: (21). Which data structure is used for efficient searching, insertion, and deletion of elements?

Asked in BPSC TRE 3.0
A.
C.
B.
D.
E.
Open question page

Que: (22). What is the average time complexity of searching for an element in a hash table?

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

Que: (23). What is a collision in hashing?

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

Que: (24). Which technique stores multiple collided elements in a linked list at the same hash index?

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

Que: (25). Which collision resolution technique checks the next available position sequentially?

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

Que: (26). What does the load factor of a hash table represent?

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

Que: (27). Which of the following is a desirable property of a good hash function?

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

Que: (28). Which of the following is NOT a common collision resolution technique in hash tables?

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

Que: (29). What is the worst-case time complexity of searching in a hash table?

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

Que: (30). Which data structure generally provides O(log n) average search time when it is balanced and maintains its ordering property?

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

Que: (31). The result evaluating the postfix expression 10 5 + 60 6 / * 8

Asked in BPSC TRE 3.0
B.
C.
A.
D.
E.
Open question page

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

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

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

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

Que: (34). What is the postfix form of the infix expression A + B?

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

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

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

Que: (36). What is the result of the postfix expression 8 2 / 3 +?

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

Que: (37). What is the result of the postfix expression 6 2 3 + *?

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

Que: (38). Which notation places the operator before its operands?

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

Que: (39). Which notation normally requires operator precedence and parentheses to determine the order of evaluation?

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

Que: (40). While evaluating a postfix expression, what should be done when an operator is encountered?

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

Que: (41). In a balanced binary tree, the height of two sub-trees of every node can not differ by more than

Asked in BPSC TRE 3.0
C.
A.
B.
D.
E.
Open question page

Que: (42). What is the balance factor of a node in an AVL tree?

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

Que: (43). Which of the following is a self-balancing binary search tree?

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

Que: (44). Which operation is used to restore the balance of an AVL tree after an insertion?

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

Que: (45). Which rotation is generally required to correct an LL imbalance in an AVL tree?

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

Que: (46). Which rotation is generally required to correct an RR imbalance in an AVL tree?

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

Que: (47). Which AVL imbalance case requires a double rotation?

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

Que: (48). What is the balance factor of an AVL node whose left and right subtrees have equal heights?

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

Que: (49). What is the worst-case time complexity of searching in an AVL tree?

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

Que: (50). Which statement about an AVL tree is correct?

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

Que: (51). A queue has configuration a, b, c, d. If you want to get the configuration d, c, b, a, you need a minimum of _______.

Asked in BPSC TRE 3.0
C.
B.
A.
D.
E.
Open question page

Que: (52). Which principle is followed by a standard queue data structure?

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

Que: (53). In a queue, insertion of a new element normally takes place at which end?

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

Que: (54). Which data structure is most commonly used to implement Breadth-First Search (BFS) of a graph?

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

Que: (55). Which condition represents a full circular queue of size N when one position is kept empty?

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

Que: (56). Which data structure is most suitable for evaluating a postfix expression?

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

Que: (57). What is the time complexity of enqueue and dequeue operations in a queue implemented using a linked list with front and rear pointers?

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

Que: (58). Which of the following is an application of a stack data structure?

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

Que: (59). A deque is a data structure in which insertion and deletion can be performed at which ends?

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

Que: (60). Consider the following stack operations: push(10), push(20), pop(), push(30), pop(). What is the sequence of elements removed from the stack?

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

Que: (61). The order of the binary search algorithm is _______.

Asked in BPSC TRE 3.0
C.
B.
A.
D.
E.
Open question page

Que: (62). What is the worst-case time complexity of binary search on a sorted array?

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

Que: (63). What is the best-case time complexity of binary search?

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

Que: (64). Which condition is necessary for applying binary search efficiently on an array?

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

Que: (65). Which search algorithm generally has O(N) worst-case time complexity?

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

Que: (66). If a sorted array contains 1024 elements, approximately how many divisions are required in the worst case by binary search?

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

Que: (67). Which data structure naturally supports binary search when its elements are maintained in sorted order?

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

Que: (68). What is the space complexity of the iterative version of binary search on an array?

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

Que: (69). Which recurrence relation represents the time complexity of binary search?

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

Que: (70). In a binary search tree, the average search time is generally _______ for a reasonably balanced tree.

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

Que: (71). The preorder traversal of a binary search tree is 15, 10, 12, 11,20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?

Asked in BPSC TRE 3.0
A.
B.
C.
D.
E.
Open question page

Que: (72). Which traversal of a Binary Search Tree always produces the elements in ascending order?

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

Que: (73). Which sequence represents the correct preorder traversal of a binary tree?

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

Que: (74). Which sequence represents the correct postorder traversal of a binary tree?

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

Que: (75). If the inorder traversal of a Binary Search Tree is 10, 20, 30, 40, 50, what can be concluded?

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

Que: (76). For a Binary Search Tree containing distinct keys, which traversal can be used to obtain the keys in sorted descending order?

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

Que: (77). What is the worst-case time complexity of searching for an element in an unbalanced Binary Search Tree containing N nodes?

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

Que: (78). How many distinct Binary Search Trees can be formed using 3 distinct keys?

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

Que: (79). If a Binary Search Tree is constructed by inserting 10, 20, 30, 40 in this order, what type of tree is produced?

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

Que: (80). Which traversal is most suitable for deleting all nodes of a binary tree safely?

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

Que: (81). How many distinct binary search trees can be created out of 4 distinct keys?

Asked in BPSC TRE 3.0
B.
A.
C.
D.
E.
Open question page

Que: (82). How many distinct binary search trees can be created using 3 distinct keys?

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

Que: (83). How many distinct binary search trees can be formed using 5 distinct keys?

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

Que: (84). Which mathematical sequence gives the number of structurally distinct BSTs that can be formed using N distinct keys?

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

Que: (85). What is the number of distinct BSTs possible with 6 distinct keys?

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

Que: (86). Which recurrence relation correctly represents the number of distinct BSTs that can be formed using N distinct keys?

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

Que: (87). If N distinct keys are inserted into a Binary Search Tree in strictly increasing order, what type of tree is generally produced?

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

Que: (88). What is the maximum height of a Binary Search Tree containing N nodes?

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

Que: (89). Which traversal of a Binary Search Tree produces the keys in sorted ascending order?

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

Que: (90). What is the worst-case time complexity of searching in a completely skewed Binary Search Tree containing N nodes?

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

Que: (91). Which of the following statements is true about Big-O notation?

Asked in BPSC TRE 3.0
B.
A.
C.
D.
E.
Open question page

Que: (92). Which asymptotic notation represents the lower bound of an algorithm’s growth rate?

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

Que: (93). Which asymptotic notation represents a tight bound on an algorithm’s growth rate?

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

Que: (94). What is the Big-O time complexity of accessing an element by index in an array?

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

Que: (95). What is the time complexity of traversing all N elements of an array once?

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

Que: (96). What is the time complexity of two nested loops, each executing N times?

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

Que: (97). Which of the following represents logarithmic time complexity?

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

Que: (98). If an algorithm performs exactly 100 operations regardless of input size N, what is its asymptotic time complexity?

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

Que: (99). Which of the following generally grows fastest as N becomes very large?

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

Que: (100). If an algorithm has a running time of 3N2 + 5N + 10, what is its asymptotic Big-O complexity?

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

Que: (101). Which of the following is NOT a step in the Divide and Conquer algorithm?

Asked in BPSC TRE 3.0
A.
C.
B.
D.
E.
Open question page

Que: (102). Which of the following algorithms is a classic example of the Divide and Conquer technique?

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

Que: (103). Which sorting algorithm uses the Divide and Conquer strategy by dividing an array into two halves?

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

Que: (104). Which step of Divide and Conquer involves breaking a problem into smaller subproblems?

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

Que: (105). In the Divide and Conquer paradigm, what does the Conquer step generally involve?

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

Que: (106). What is the typical worst-case time complexity of Merge Sort?

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

Que: (107). Which recurrence relation represents the typical running time of Merge Sort?

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

Que: (108). Which algorithm uses Divide and Conquer and has an average-case time complexity of O(N log N)?

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

Que: (109). Which algorithm repeatedly divides the search interval into two halves?

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

Que: (110). Which recurrence is characteristic of an algorithm that divides a problem into two equal subproblems and performs linear work to combine their results?

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

Que: (111). Merge Sort is an example of which algorithm design paradigm?

Asked in BPSC TRE 3.0
C.
B.
A.
D.
E.
Open question page

Que: (112). What is the worst-case time complexity of Merge Sort?

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

Que: (113). Which step of Merge Sort combines two sorted subarrays into one sorted array?

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

Que: (114). What is the recurrence relation for the standard Merge Sort algorithm?

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

Que: (115). What is the auxiliary space complexity of the typical array-based Merge Sort implementation?

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

Que: (116). Which sorting algorithm is generally considered stable and has O(N log N) worst-case time complexity?

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

Que: (117). Which algorithm uses a pivot to partition an array into smaller subarrays?

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

Que: (118). Which of the following is NOT a characteristic of the standard Merge Sort algorithm?

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

Que: (119). Which sorting algorithm has O(N log N) best, average, and worst-case time complexity and is based on Divide and Conquer?

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

Que: (120). If an array contains 16 elements, into how many single-element subarrays will Merge Sort eventually divide it?

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

Que: (121). How many edges does a spanning tree of a graph with N vertices have?

Asked in BPSC TRE 3.0
A.
B.
C.
D.
E.
Open question page

Que: (122). A tree has 10 vertices. How many edges does it contain?

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

Que: (123). Which of the following is a necessary property of a spanning tree?

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

Que: (124). What is the maximum number of edges that can be present in a simple undirected graph with N vertices?

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

Que: (125). What happens when one edge is removed from a tree?

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

Que: (126). What happens when an additional edge is added to a tree?

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

Que: (127). Which algorithm is commonly used to find a Minimum Spanning Tree of a connected weighted graph?

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

Que: (128). How many edges are present in a spanning tree containing 25 vertices?

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

Que: (129). A connected graph has 8 vertices and 12 edges. How many edges must be removed to obtain a spanning tree?

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

Que: (130). Which statement about a spanning tree of a connected graph is correct?

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

Que: (131). Which of the following is NOT a graph traversal algorithm?

Asked in BPSC TRE 3.0
C.
B.
A.
D.
E.
Open question page

Que: (132). Which graph traversal algorithm uses a queue data structure?

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

Que: (133). Which graph traversal algorithm commonly uses a stack or recursion?

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

Que: (134). What is the time complexity of BFS for a graph represented using an adjacency list?

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

Que: (135). What is the time complexity of DFS for a graph represented using an adjacency list?

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

Que: (136). Which traversal is generally suitable for finding the shortest path in an unweighted graph?

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

Que: (137). Which of the following is a common application of DFS?

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

Que: (138). Which data structure is primarily associated with Breadth-First Search?

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

Que: (139). Which traversal technique can be used to detect a cycle in an undirected graph?

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

Que: (140). Which of the following correctly matches a graph traversal algorithm with its commonly associated data structure?

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

Que: (141). Which of the following is NOT an NP-Complete problem?

Asked in BPSC TRE 3.0
C.
A.
B.
D.
E.
Open question page

Que: (142). Which of the following problems was the first problem proven to be NP-Complete?

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

Que: (143). Which of the following is an NP-Complete problem?

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

Que: (144). Which of the following is an NP-Complete problem related to finding a fully connected subset of vertices in a graph?

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

Que: (145). Which of the following is an NP-Complete graph problem?

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

Que: (146). Which of the following problems is known to be NP-Complete?

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

Que: (147). Which statement correctly describes the relationship between P and NP?

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

Que: (148). If an NP-Complete problem can be solved in polynomial time, what would follow?

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

Que: (149). Which of the following is generally solved in polynomial time rather than being NP-Complete?

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

Que: (150). Which of the following statements about polynomial-time reduction is correct?

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

Que: (151). Which of the following is an advantage of using arrays?

Asked in BPSC TRE 3.0
B.
C.
A.
D.
E.
Open question page

Que: (152). What is the time complexity of accessing an element at a given index in an array?

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

Que: (153). 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: (154). Which of the following is generally true about deleting an element from the middle of an array?

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

Que: (155). How are elements of a traditional array generally stored in memory?

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

Que: (156). Which searching algorithm can find an element in O(log n) time in a sorted array?

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

Que: (157). What is the worst-case time complexity of linear search in an unsorted array of n elements?

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

Que: (158). Which of the following data structures provides efficient random access using an index?

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

Que: (159). Which of the following is a disadvantage of a fixed-size array?

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

Que: (160). Which statement correctly compares array and linked-list access by position?

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

Que: (161). Which of the following is NOT a basic operation performed on a data structure?

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

Que: (162). Which operation involves visiting each element of a data structure systematically?

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

Que: (163). Which data-structure operation is used to add a new element?

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

Que: (164). Which data-structure operation is used to remove an existing element?

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

Que: (165). Which operation is used to determine whether a particular element exists in a data structure?

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

Que: (166). Which of the following is generally considered a basic operation on data structures?

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

Que: (167). Which operation changes the value of an existing element without necessarily adding or removing an element?

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

Que: (168). Which operation arranges data elements according to a specified order?

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

Que: (169). Which of the following is NOT primarily a data-structure operation?

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

Que: (170). Which of the following correctly matches a data structure with a common operation?

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