Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2008, 05:33 AM
Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
student89 is on a distinguished road
Default AVL-tree construction
Hi, having some trouble with this, I need to construct an avl tree based off of coordinates - (x,y) which are stored in an array. On odd levels I branch based off of the x value, and on even the y. Problem I'm having is that even though I branch based on alternating precedence, all branches are still subject to previous branches. An immediate thought was to, after selecting my root, create two sub arrays of the values to the left and right and then repeat this routine recursively. This seems way to costly for runtime though - for this project input size won't be large enough to cause problems, but runtime is still important. Any ideas? Not asking anyone to write up code or anything, just for suggestions/thoughts.
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
How to create a SWT Tree Java Tip SWT 0 07-07-2008 04:54 PM
java tree tony404 Advanced Java 5 06-23-2008 06:43 PM
Need Help With Tree Adt avi New To Java 0 03-20-2008 03:11 AM
Pakage tree Thewhitelynx New To Java 1 03-17-2008 02:53 AM
Creating a tree Preethi AWT / Swing 0 01-07-2008 01:04 PM


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



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