Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-06-2008, 06:53 PM
Member
 
Join Date: Sep 2008
Location: Florida
Posts: 5
Rep Power: 0
dch414 is on a distinguished road
Default Binary Search Tree Traversal
I am not sure if this belongs in beginning or advanced, but just in case I am placing it here. I am in need of an iterative method that can traverse a binary search tree of objects. I can do it recursively easy. Specifically i need an NLR traversal. I would post my code but it is 5 classes and quite long. I googled it with little success (mostly recursive out there). I also cannot use the java API as per specifications...sucks.
Thanks in advance. Let me know if you need anything else and any links to existing sites that can help would be awesome as well.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-06-2008, 09:44 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
Is your assignment to write the code, or to find it?
Do you learn more by writing the code or by reading it?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-07-2008, 12:01 AM
Member
 
Join Date: Sep 2008
Location: Florida
Posts: 5
Rep Power: 0
dch414 is on a distinguished road
Default reading it
You can easily do it recursively, but I am having one hell of a time figuring out iteratively. It is just a matter of finding it for the assignment. I can do it recursively or even use the API for much of it in the real world...
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help. Binary Search Problem Krooger Advanced Java 1 11-03-2008 06:19 AM
Can anybody help with cuncurrent binary search tree guys) danylo Threads and Synchronization 1 04-23-2008 06:22 PM
Binary Tree Implementation in Java Java Tip java.lang 0 04-16-2008 10:35 PM
Binary Search in Java Java Tip Algorithms 0 04-15-2008 07:43 PM
binary search tranceluv New To Java 10 01-14-2008 07:13 PM


All times are GMT +2. The time now is 03:23 AM.



VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org