Hello, help make a copy of a binary tree. Only root Node is given.

    1 answer 1

    A Node root, like any Node branch, is a structure object that has a field (or fields) containing information about Node's child branches (sometimes also parent ones), and a field or fields with some data that the tree itself must store . Accordingly, having a root, it is possible to bypass all child branches, creating at the same time each branch anew in a new tree. This will be the copy. It is possible to bypass child branches with the help of a wide walk and a long walk. Search Google for what it is and understand.