User Tools

Site Tools


tutorials:exercises_binary_ternary_tree

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tutorials:exercises_binary_ternary_tree [2025/10/28 17:47] – created MHtutorials:exercises_binary_ternary_tree [2025/11/01 09:47] (current) – [Solution] Tim
Line 2: Line 2:
 ===== From binary to ternary tree ===== ===== From binary to ternary tree =====
  
-Change the default 3d binary tree to a ternary version, a tree with tree instead of two brances.+Change the default 3d binary tree to a ternary version, a tree with tree instead of two branches.
  
 {{ :tutorials:tree_3d.png?direct&250 |}}{{ :tutorials:tree_ternary.png?direct&250 |}} {{ :tutorials:tree_3d.png?direct&250 |}}{{ :tutorials:tree_ternary.png?direct&250 |}}
Line 9: Line 9:
 ==== Solution ==== ==== Solution ====
  
 +<hidden solution>
 To achieve this, we need to add another branch and explicitly rotate the branches to (0, 120, and 240) degree. To achieve this, we need to add another branch and explicitly rotate the branches to (0, 120, and 240) degree.
  
Line 19: Line 20:
 ] ]
 </code> </code>
 +</hidden>
tutorials/exercises_binary_ternary_tree.1761670043.txt.gz · Last modified: 2025/10/28 17:47 by MH