Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q.1 A burglar plans to rob a jewelry. He can carry a maximum weight of 35 grams into his pocket and five items targeted. The
Q.1 A burglar plans to rob a jewelry. He can carry a maximum weight of 35 grams into his pocket and five items targeted. The items, values & weights are given in a table below. Item Gold necklace Earrings Diamond ring Gold bracelet Value 80 40 120 100 Weight (g) 8 2 4 The burglar can take a fraction of any item with him. Now, what would be the choice of items of this burglar? Write the pseudocode of the algorithm. Provide the time complexity of pseudocode. 10 Q.1(b) A graph with the following precedence rules is as follows: B, C, D E Draw the graph using the rules. Perform topological sort, and write the output with a temporary stack. B C D
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started