1/27/2003
CS2 Week 7
62
MakeNode
•
parameter:
item to be inserted
•
steps:
–
allocate
memory
for the new node
–
check if memory allocation is
successful
–
if so, put
item
into the new node
–
set
left
and
right
branches to
NULL
•
returns:
pointer to (i.e. address of) new node