Question: class node _ 2 d { public: int data; node _ 2 d * next _ x; node _ 2 d * next _ y;
class noded
public:
int data;
noded nextx;
noded nexty;
nodedint d noded xnullptr, noded ynullptr
data d;
nextx x;
nexty y;
noded insertxint d
nextx new nodeddnextx;
return nextx;
noded insertyint d
nexty new nodeddnullptr,nexty;
return nexty;
;
noded head nullptr;
noded tmp nullptr;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
