Hi,

I want to create a tree of nodes where each node will have only one parent 
and arbitrary number of children. Also each branch can go to arbitrary 
depth. Now, if I want to define julia type for such a node, how it should 
be like?
In C++, I can use

struct trieNode {
// hold data
unsigned id;
float value;

// to hold number of children of this node
unsigned noOfChildren;
// link to first child of this node, NULL is no child
trieNode *firstChild;
// pointer to next sibling(NULL if this is last child). Parent can access 
other children through their first child only
trieNode *nextSibling;

};

What is the equivalent of above in Julia?

Is there a better/alternate way to solve this problem in Julia?

Thanks ahead,
vish

Reply via email to