(a) What are differences between Breadth first search (BFS) and Depth first search (DFS)? For what sort of problems it is better to use BFS than…

(a) What are differences between Breadth first search (BFS) and Depth first search (DFS)? For what sort of problems it is better to use BFS than DFS?

(b) Write the advantages and disadvantages of using linked list instead of using array.

(c) Define time complexity of an algorithm. Mention in brief-why is the worst-case Complexity of Quicksort O(n²).

(d) Is it possible to apply Binary search in a sorted linked list? Justify your answer with proper example.

(e) Suppose that in-order and preorder traversal of a binary tree are dbeafcg and abdecfg respectively. What will be the post-order traversal of the Binary tree?

From the BCS Technical Cadre (CSE) January 2024 – 45th BCS Written (BPSC) exam, question 3 of 8.

More from this paper