I found a piece of code online. But I don't understand what does the second const do in the operator function:
class Node {
public:
int row, col, val;
Node (int r, int c, int v) : row(r), col(c), val(v) {};
bool operator < (const Node &obj) const {
return val > obj.val;
}
};
Can anyone explain its purpose? Thank you!