Write a recursive version of Ancestors (see Exercise 27) that prints out the ancestors in reverse order
Question:
Write a recursive version of Ancestors (see Exercise 27) that prints out the ancestors in reverse order (first the parent, then the grandparent, and so on).
Exercise 27
Add a TreeType member function Ancestors that prints the ancestors of a given node whose info member contains value. Do not print value. 1. Write the declaration. 2. Write the iterative implementation.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C++ Plus Data Structures
ISBN: 9781284089189
6th Edition
Authors: Nell Dale, Chip Weems, Tim Richards
Question Posted: