Data Structures, Algorithms, & Applications in C++
Chapter 11, Exercise 55


It is more convenient to draw these binary trees with each right child pointer as a horizontal line that connects two siblings and each left child pointer as a vertical line that connects a parent to one of its children.

(a)
The binary tree representations of the trees of Figures 11.16 (a) and (b) are:
    20                                   16
    |                                    |
    5 ---- 6 ---- 8 ---- 30              11 ---- 25 ---- 28
    |             |
    1 ---- 2      3 ---- 4

              (a)                                (b)


The binary tree representations of the trees of Figures 11.17 (a) and (b) are:
    26                                   16
    |                                    |
    16 --------------- 32                11 ---- 25 ---- 28 ---- 26
    |                                                            |
    11 ---- 25 ---- 28                                           32

            (a)                                      (b)


The binary tree representations of the trees of Figures 11.19 (a) and (b) are:
    20                                    16
    |                                     |
    5 ---- 6 --- 8 ---- 30                11 ---- 25 ---- 28
    |            |                        |
    1 ---- 2     3 ---- 4                 15
                                          |
                                          26

              (a)                                (b)
(b)
The binary tree representation of the tree of Figure 11.12 is given below.

    p
    |
    q ------------------------------ r
    |                                |
    s ---- t                         u ---- v
    |                                |      |
    w ---- x                         y      z