Category solved model papers

Horspools algorithm for string matching

5. Design Horspools algorithm for string matching. Apply Horspools algorithm to find the pattern BARBER in the text: JIM_SAW_ME_IN_A_BARBERSHOP Answer: Horspool’s algorithm is an efficient string matching algorithm that improves…

Heapsort with example

4. Explain Heapsort with example Answer: Two Stages: Stage 1 (Build Heap): Construct a heap from the input array. Time: O(n) Stage 2 (Sort): Delete the maximum (root) n−1 times…

Strassen’s matrix multiplication and its time complexity

9) Explain Strassen’s matrix multiplication and derive its time complexity Answer:Strassen’s Matrix Multiplication Strassen’s Matrix Multiplication is a divide-and-conquer algorithm introduced by Volker Strassen in 1969, which improves the efficiency…