DAA Lab Questions With Answers
DAA Lab Questions With Answers
Array of Structures:
1. Name: "Alice", Score: 50
2. Name: "Bob", Score: 80
3. Name: "Charlie", Score: 70
4. Name: "David", Score: 90
Lab External Questions
Lab External Questions
Test case 2:
Number of items: 4
Items (Value, Weight): [(60, 10), (40, 40), (100, 20), (120, 30)]
Knapsack capacity: 50
Source vertex: 0
Lab External Questions
Test case 2:
Number of items: 4
Items (Value, Weight): [(60, 10), (40, 40), (100, 20), (120, 30)]
Knapsack capacity: 50
Lab External Questions
Lab External Questions
Lab External Questions
Number of vertices: 5
Graph (Adjacency Matrix):
0 10 0 0 20
10 0 10 0 0
0 10 0 30 0
0 0 30 0 0
20 0 0 0 0
Source vertex: 0
Lab External Questions
Lab External Questions
Test case 1:
Number of items: 4
Item Weights: [1, 3, 4, 5]
Item Values: [1, 4, 5, 7]
Knapsack Capacity: 7
Test case 2:
Number of items: 3
Item Weights: [2, 3, 4]
Item Values: [3, 4, 5]
Knapsack Capacity: 5
Lab External Questions
Lab External Questions
7.Print all the nodes reachable from a given starting node “B” in a given
Undirected graph using BFS, DFS method.
Lab External Questions