Let us construct the Tree shown in the above figure
Node * root = newNode ( 10 ) ; root -> left = newNode ( 20 ) ; root -> right = newNode ( 30 ) ; root -> left -> left = newNode ( 40 ) ; root -> left -> right = newNode ( 50 ) ; root -> right -> right = newNode ( 70 ) ; cout << " Given ▁ Tree STRNEWLINE " ; preorder ( root ) ; list < bool > struc ; list < int > data ; EncodeSuccinct ( root , struc , data ) ; cout << " Encoded Tree " cout << " Structure ▁ List STRNEWLINE " ;