ds

U

uday

can u tell me a group over data structures in either c or c++. how can
we write a program for finding the depth of tree in c
 
L

Lawrence Kirby

can u tell me a group over data structures in either c or c++. how can
we write a program for finding the depth of tree in c


comp.programming is a good place to discuss algorithms and datastructures.
You can find the depth of a binary tree easily with a recursive algorithm

depth = 1 + max(depth of left subtree, depth of right subtree)

Lawrence
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top