Then how would we access them... if it is a binary tree, we can use left
and right but what if we have more than 2 children?
On 17 Nov 2013 08:23, "Vivek Galatage" <notifications@github.com> wrote:

> In src/utils/node.h:
>
> > +namespace utils {
> > +
> > +template <class T>
> > +class Node {
> > +public:
> > +    Node();
> > +    Node(T val);
> > +    void setValue(const T val);
> > +    void setParent(Node* parent);
> > +    T value() const;
> > +    Node* parent() const;
> > +    int children();
> > +    void addChildToLeft(Node* child);
> > +    void addChildToRight(Node* child);
> > +    void addChildAtPosition(int pos, Node* child);
> > +    Node* getChildAt(int pos) const;
>
> Specifying index position might be confusing about how one would index
> them. We would not use this one.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/vivekgalatage/DSLibrary/pull/12/files#r7711417>
> .
>