Question: Use C++ programming language 1) Implement the Counting Sort algorithm using your favorite programming language. a) Upon running, your program should prompt the user for

Use C++ programming language  Use C++ programming language 1) Implement the Counting Sort algorithm using

1) Implement the Counting Sort algorithm using your favorite programming language. a) Upon running, your program should prompt the user for the input array size b) Then your program should generate an array of requested size and fill it with random integers between 1 and 100 (so in Counting sort your k-100, which means the 'C' array should have indices from 0 to 100) c) Print the generated random array d) Finally, print the sorted array. 2) Implement the Fractional Knapsack problem using your favorite programming language. pt the user for item weights. b) Then prompt the user for item values. c) Then prompt the user for the knapsack weight rating (W) d) Print each and every greedy choice. That is the items that are selected and how much of each

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!