I need a recursive function written in C that adds a Link list node on top of the previous. Can anyone help?
Printable View
I need a recursive function written in C that adds a Link list node on top of the previous. Can anyone help?
why recursive? is the link doubly linked? which end? search function? sorted?
here is the structure of the node
struct Node
{
int data;
Node *next;
};
typedef struct Node *Box;
int main()
{
Box head, temp;
}
I have to call recursivefunction out of main that will take an array as an argument and assign each element on top of the previous in the link list.
what is previous in the linked list?
Why not do it iteratively?
Like a binary tree? Take a look at dynamictree.cpp on my
web page. It uses recursion to add and search nodes.