#include using namespace std; struct Item { int weight; int profit; }; float profitPerUnit(Item x) { return (float)(x.profit/x.weight); } int partition (Item arr[], int low, int high) { Item pivot = arr[high]; // pivot int i = (low - 1); // Index of smaller element for (int j = low; j itemArray[i].weight; cin>>itemArray[i].profit; } quickSort(itemArray, 0, n); float maxProfit=0; int i=0; while(capacity>0 && iitemArray[i].weight) { maxProfit+=itemArray[i].profit; capacity-=itemArray[i].weight; cout<<"\n\t"<