ds

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • uday

    #1

    ds

    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

  • Lawrence Kirby

    #2
    Re: ds

    On Wed, 15 Dec 2004 21:57:00 -0800, uday wrote:
    [color=blue]
    > 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[/color]


    comp.programmin g 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

    Comment

    Working...