I need to create a tree built from nodes that can have any number (within reason, between 0 and 10 words) of outgoing transitions, for example:
X / | \ X X X / X / \ X X
What tree structure is this? What are the methods for creating and, in particular, modifying trees of this kind?
thank
It is just a common tree. Perhaps because binary trees are so common, this tree looks different, but in fact it is a binary tree, which is a special case of the tree.
. , , , . , , 0 10 , / 10 .
, . ( 2 node). .
2-3 , 2 3 , .
. , , , 2 0, .
, , : , .
(, , ), node , node -to-child, node. ,
0, 0, 1
node. , node.
You have a simple tree. Special cases are binary trees or a balanced tree. This is not true.
Most languages have libraries for managing them. Recursion is a popular technique. All college-level textbooks on data structures talk in detail about how to draw a tree.
You can get a review here .
Source: https://habr.com/ru/post/1752889/More articles:Невозможно удалить специальные символы с помощью str_replace - phpNSPredicate - to search for events that occur between a specific date range - iphoneThe most efficient public key encryption method - performanceForce pdflatex to create one square for each word - pdf-generationUpdate / Downgrade Read / Write LockFileEx - c ++Can you get around SQL Server Express size limits by stacking databases? - sqlPython quick string analysis, manipulation - performanceHow to store decimal value in java - javaWhy is it allowed to set a property that does not set anything in C #? - c #Nested creation type in stored procedure T-SQL declaration - sqlAll Articles