0
class JewelStone {
public:
    int weight, value;
    JewelStone(int weight, int value) {
        this->weight = weight;
        this->value = value;
    }
};

And we have a function definition

int getMaxValue(vector<JewelStone*> stones, int capacity) {
}

How we can sort in descending order of the values?

0 Answers0