Describing knapsack problem and merge sort


1) Describe Knapsack Problem in detail with suitable example.

2) Describe the algorithm for maximum and minimum numbers in the array.

3)(a) Give a detailed note on Divide and Conquer techniques with suitable example.

(b) Sort the following set of elements using merge sort

12, 24, 8, 71, 4, 23, 6, 89, 56

4) Write down an algorithm for searching an element using Binary search method. Give suitable example.

5)(a) Write a pseudo code for divide and conquer algorithm for merging two sorted arrays into a single sorted one. Explain with suitable example.

(b) Setup and solve a recurrence relation for number of key comparisons made by above pseudo code.

6)(a) Write down the algorithm to sort a set of N numbers using insertion sort.

(b) Outline the algorithm for the following set of numbers.

20,35,18,8,14,41,3,39

7) Describe in detail merge sort. Demonstrate the algorithm with a suitable numeric example. Provide complete analysis of the same.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Describing knapsack problem and merge sort
Reference No:- TGS010772

Expected delivery within 24 Hours