Answer:PROCEDURE CREATE_CD(T)
[Where pointer ‘HEAD’ has been caought in pointer ‘T’ and pointer ‘head’ and ‘p’ are global variables]
1. [Allocating the memory for the node and taking value from the user]
Call GETNODE (T)
DATA (T) <-- ‘xyz’
LEFT (T) <-- S
RIGHT (T) <-- 0
RIGHT (S) <-- T
S <-- T
2. [Checking the value and calling the function recursively]
if (DATA (T) <= 0)
RIGHT(LEFT (T)) <-- HEAD
LEFT (HEAD) <-- LEFT (T)
P <-- LEFT (T)
CALL REMOVE NODE (T)
return
else
Call CREATE_CD (T).
3. [FINISH]
return.