searching node

This is a discussion on searching node within the C Programming forums, part of the General Programming Boards category; well, i need some ideals from yours. anyone who have ideals on the breadth-frist binary search tree by recursion technique. ...

  1. #1
    ~- Y u n a -~ beely's Avatar
    Join Date
    Dec 2001
    Posts
    291

    searching node

    well, i need some ideals from yours.

    anyone who have ideals on the breadth-frist binary search tree by recursion technique. i can't mix the code with other function, such as bin search, depth-first search and others. i would prefer some advises and ideals (how to pointer move, what things should do.... ), i need not to have the source code. i wan have a try. pls ... thanks guys.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    A good first step would be to study the algorithm from a google search.

    -Prelude
    My best code is written with the delete key.

  3. #3
    ~- Y u n a -~ beely's Avatar
    Join Date
    Dec 2001
    Posts
    291
    well, thanks anyway prelude. thank for help

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    Maybe reading this site helps.

    http://purists.org/bintree/

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by beely
    well, thanks anyway prelude. thank for help
    Seriously, Beely, this is like the third time in as many days that you've asked a similar question. And every single time, you're referred to do a search and make some actual effort on your part. You'd think you'd learn by now...

    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Registered User
    Join Date
    Dec 2002
    Posts
    27
    Really liked this page
    "Can i really learn this? If i cant, why bother?"

  7. #7
    ~- Y u n a -~ beely's Avatar
    Join Date
    Dec 2001
    Posts
    291

    i have done it ... thanks for all

    Originally posted by quzah
    Seriously, Beely, this is like the third time in as many days that you've asked a similar question. And every single time, you're referred to do a search and make some actual effort on your part. You'd think you'd learn by now...

    Quzah.
    well... i can't find the ideals from the internet. all of the resources are not useful to me. but anyway, thanks for help .... i have done with my ownself, wanna see ?
    Code:
    void breadth_first_search (DataType x, TREE T)
    {
    	if(T != NULL && !Stop)
    	{
    		if(Count == T->Level)
    		{
    			printf("%d", T->Data);
    			if(x == T->Data)
    			{
    				printf("\n\nSummary : Node %d is in level %d", T->Data, T->Level);
    				Stop = 1;			
    			}
    		}
    		breadth_first_search (x, T->Left);
    		breadth_first_search (x, T->Right);
    	}
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 03:09 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM

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