b tree traversal

This is a discussion on b tree traversal within the C++ Programming forums, part of the General Programming Boards category; I want to ask a question. question is that Write a code in C++ for B tree deletion?code should be ...

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    2

    b tree traversal

    I want to ask a question. question is that
    Write a code in C++ for B tree deletion?code should be logical and compact?

  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Quote Originally Posted by M Azhar Khan View Post
    I want to ask a question.
    That's what we're here for.
    Quote Originally Posted by M Azhar Khan View Post
    Write a code in C++ for B tree deletion?
    That's not a question...
    Quote Originally Posted by M Azhar Khan View Post
    code should be logical and compact?
    Absolutely. The more logical and compact, the better. Readability is also important, as is correctness.

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,755
    > That's not a question...
    Well it could be it you prepend "Will you" to the statement.

    It's not likely to change the answer though
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,308
    Code:
    int main()
    {
        char* B_tree = new char[8];
        strcpy(B_tree, "B tree");
        delete[] B_tree; // Woo - B tree deletion!
    }
    Pretty small and compact if you ask me.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 06:59 PM
  2. Tree traversal
    By recluse in forum C Programming
    Replies: 4
    Last Post: 12-05-2004, 04:00 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 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