21 4.5 h e
int operator<=(const Rec& x, const Rec& y) { return x.key<=y.key; }
ostream& operator <<(ostream& ostr, const Rec& r) { ostr<<"Key: "<<r.key<<"Data: "<<r.data<<endl; return ostr; }
Output -3/6 Output -1/2 Output 25/2 Output 7/5 Output 11/10 Not valid. It is not clear whether to convert R1 to double or 2.5 to rational.