How to re4ad a Tree

Need help with C, C++, perl, python, etc?

How to re4ad a Tree

Postby pythagorasmk » 2019-01-30 20:44

I have Tree in leftmost-child right-sibling representation. Structure for defining the Three is:
typedef struct Node *pNode;
struct Node {
int label;
pNode parrent, left_most_child, right_sibling;

The tree is represented with the pointer of the type pNode. I want function readTree which will read the label, number of sub nodes, for each node from the user from console and will construct the tree, and afterr that it will return pointer to the tree. The form of the function should be:

pNode readTree(void)

Posts: 83
Joined: 2015-01-18 03:40

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests