k-Node tree - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

k-Node tree

suburbanmtsuburbanmt Posts: 12Member
Hi,

I would like to implement a tree structure with a root node and each node can have k-child nodes. Does anyone know of a datastructure that represents this type of tree apart from a B-Tree.

Thanks

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi,
    :
    : I would like to implement a tree structure with a root node and each node can have k-child nodes. Does anyone know of a datastructure that represents this type of tree apart from a B-Tree.
    :
    : Thanks
    :
    I don't know of a library class, which has that structure, but it can easily be created. All you need is to have each node contain a Collection of other nodes, representing its children.
  • suburbanmtsuburbanmt Posts: 12Member
    : : Hi,
    : :
    : : I would like to implement a tree structure with a root node and each node can have k-child nodes. Does anyone know of a datastructure that represents this type of tree apart from a B-Tree.
    : :
    : : Thanks
    : :
    : I don't know of a library class, which has that structure, but it can easily be created. All you need is to have each node contain a Collection of other nodes, representing its children.
    :

    I have implemented it that way by having each node containing a vector of child nodes - but I don't know whether it is efficient or not. Any idea please?
Sign In or Register to comment.