Questions tagged [multiway-tree]

A multiway tree is a tree where each node can have a variable number of children.

A tree data structure is a structure consisting of nodes with some number of children. Many trees a binary trees (each node has 0, 1, or 2 children), though trees with multiple children exist as well. This tag is appropriate for questions specifically about multiway trees.

52 questions
0
votes
1 answer

Is this how I should be understanding what a multiway tree is?

I am currently about to implement a multi-way tree in c++, but I am still not sure about what exactly they are. I have read a few documentations, but I am still confused because of the lack of pictures or visualization provided. Lets say I want a…
Belphegor
  • 1,683
  • 4
  • 23
  • 44
0
votes
1 answer

Inserting into a b*-tree

I’m having trouble understanding how to insert elements into a b*-tree, especially when it comes to the root node. Lets say you have a b*-tree of order 9, and you were to insert the following items into the tree, 0, 1 , 2 ,5 ,7,9,10 and 12 I would…
user3497807
0
votes
1 answer

Preorder traversal of a tree

I have implemented a method to do a preorder traversal of a tree, which is not a binary tree. Every parent node of this tree has an array of children, so this is the method I am using: void preorderTraversal(TreeNode tree) { if (tree ==…
AMH9
  • 179
  • 1
  • 4
  • 20
0
votes
3 answers

Ada 2012 Multiway Tree, Create Root Node

I'm using the bounded version of the Multiway Tree. I can create my element type and instantiate a tree of my type but how do I create the root? I see several forms of Insert_Child. All my attempts at using Insert_Child fail because I use…
user1625344
  • 183
  • 1
  • 13
0
votes
0 answers

Interactive multiway tree/graph applet with mouse listeners

I have a graph in which the nodes have 0 or more successors and 0 or more predecessors. I want to make a visualization (preferably through JAVA) such that: There should be a search box. If I enter the id of the node the node should appear on the…
-1
votes
1 answer

b-tree fullness (as percentage)

I am currently busy implementing a B-Tree in JAVA. One of the methods requires me return as a percentage the fullness of the complete tree. The percentage should be out of 100 and if, for example, 50 is returned, it means that the tree is 50% full.…
Gtamcn
  • 23
  • 4
-2
votes
1 answer

Finding the number of the neighbours of a given node of a multiway tree (rose tree) in Haskell

Consider the following definition of a Rose Tree: The tree can contains unique nodes. data NTree a = Nil | Node { root :: a, subtree :: [NTree a]} deriving Show -- or just data NTree a = Nil | Node a [NTree a] t1 :: NTree Int t1 = Node 1 [Node 2 […
1 2 3
4