multiway-tree

What is the left-child, right-sibling representation of a tree? Why would you use it?

谁说我不能喝 提交于 2019-11-26 10:23:09
问题 Many data structures store multi-way trees as binary trees using a representation called the \"left-child, right-sibling\" representation. What does this mean? Why would you use it? 回答1: The left-child, right-sibling representation (LCRS) is a way of encoding a multi-way tree (a tree structure in which each node can have any number of children) using a binary tree (a tree structure in which each node can have at most two children). Motivation To motivate how this representation works, let's