SET A
Q1. What is Knapsack
problem, explain solution using brute force approach and using same, solve for
the given data set. Consider knapsack
capacity as 9.
Item

Weight

Value

1

5

50

2

3

60

3

7

90

4

6

70

Q2.
Write and Explain Quick sort Algorithm.
Q3.
Given an array of 6 elements: 15, 19, 10, 7, 17, 16, sort it in
ascending order using heap sort
and analyse heap sort.
SET B
Q1.
Write and Explain Merge sort algorithm.
Q2. Using Count Sort, sort the following array
Q3.
Write equations for large integer multiplication method, and using same
Multiply 1543 and 1621.
0 comments:
Post a comment