homework 6 submission

No,
r->right = add(k,x,r->right);
return r;