Binary Search Tree Cost of Path

This is a discussion on Binary Search Tree Cost of Path within the C++ Programming forums, part of the General Programming Boards category; Hey I need the code or algoritm for finding the largest path in binary search tree. The cost of a ...

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    1

    Binary Search Tree Cost of Path

    Hey I need the code or algoritm for finding the largest path in binary search tree. The cost of a path is the sum of the values of the nodes in that path. I need to find the most expensive from the root to a leaf node. Thanks i just dont know what to do.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    For BST stuff, I'll point you here.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BST (Binary search tree)
    By praethorian in forum C++ Programming
    Replies: 3
    Last Post: 11-13-2005, 09:11 AM
  2. searching and insertion in a binary search tree
    By galmca in forum C Programming
    Replies: 1
    Last Post: 03-26-2005, 05:15 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Binary Search Tree, Inserting node
    By cheryl_li in forum C Programming
    Replies: 1
    Last Post: 09-13-2003, 04:53 AM
  5. BST/Red and Black Tree
    By ghettoman in forum C++ Programming
    Replies: 0
    Last Post: 10-24-2001, 11:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21