Ravi said:
Hi,
I need to find the non-recursive algorithm to find the height of a
Binary Tree.
Regards,
SunLight.
According to Kruse, "Data Structures & Program Design" any recursive
algorithm can be converted to a non-recursive one, by theorem. However,
the proof is not constructive, so there is no guidance for specific cases.
This is why CS, like mathematics, has an element of art.
--
Julian V. Noble
Professor Emeritus of Physics
(e-mail address removed)
^^^^^^^^^^^^^^^^^^
http://galileo.phys.virginia.edu/~jvn/
"For there was never yet philosopher that could endure the
toothache patiently."
-- Wm. Shakespeare, Much Ado about Nothing. Act v. Sc. 1.