tutorials:exercises_binary_ternary_tree
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tutorials:exercises_binary_ternary_tree [2025/10/28 17:47] – created MH | tutorials: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. |
| {{ : | {{ : | ||
| 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: | ||
| ] | ] | ||
| </ | </ | ||
| + | </ | ||
tutorials/exercises_binary_ternary_tree.1761670043.txt.gz · Last modified: 2025/10/28 17:47 by MH
