Results 1 to 3 of 3
- 05-30-2011, 11:44 PM #1
Member
- Join Date
- May 2011
- Posts
- 5
- Rep Power
- 0
Java Balancing Tree, please help right away ASAP !!!!
I can't get this one problem and need it for an assignment
(14pts) Below is the diagram to rebalance an AVL tree when the AVL condition is violated at the node P because of an insertion to the right of P's left child.
Complete the method doubleWithLeftChild(Node p) below that (1) rebalances the tree at P, (2) adjusts the heights of nodes whose children have changed, and (3) returns a reference to the new root node R of the rebalanced subtree.
DIAGRAM
PictureTrail: Online Photo Sharing, Social Network, Image Hosting, Online Photo Albums
Node doubleWithLeftChild(Node p)
{
}
where the Node structure is private class Node
{
public E data;
public Node left;
public Node right;
public int height;
public Node() { height = -1; }
public Node(E d) { data = d; height = 0; }
}
- 05-31-2011, 12:19 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,606
- Rep Power
- 5
i think once is enough...posting many threads with the same thing (such as this one ) will not get you help faster, in fact in a lot of ways will hurt your chances of getting help (as does indicating you need help asap). Further, dumping a homework assignment is indicative that you expect us to make an effort when you haven't. So...what have you done so far to tackle this assignment? Where are you stuck?
-
I've already locked one of your multi-posts already and am locking this one. Please don't do this again.
Similar Threads
-
Java Balancing Tree, I have no idea how to do this can some one help me PLEASE
By Jumanji245 in forum Advanced JavaReplies: 6Last Post: 05-31-2011, 04:18 AM -
I need help with this problem ASAP, Java Balanacing Tree !!!!!
By Jumanji245 in forum Advanced JavaReplies: 1Last Post: 05-30-2011, 11:43 PM -
java Socket Load balancing
By rajeshsun69 in forum NetworkingReplies: 0Last Post: 12-17-2010, 11:25 AM -
Data Structures(Binary Search Tree to AVL Tree)ASAP pls
By jfAdik in forum Forum LobbyReplies: 0Last Post: 04-04-2010, 07:40 AM


LinkBack URL
About LinkBacks

Bookmarks