944,139 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 927
  • Java RSS
Nov 5th, 2009
0

What's the difference between a parent and predecessor node in binary search tree?

Expand Post »
Just wondering what the difference is. I don't think I need to post my code, but basically for my assignment, I have stubs for a binary search tree. There are nodes created in the constructor, and among them are:

Node parent
Node predecessor
Node sucessor
Node right
Node left

Is there a point in predecessor and sucessor? Seems to me it would work with just parent, right, and left, no?

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
iamsmooth is offline Offline
49 posts
since Jul 2009
Nov 5th, 2009
0
Re: What's the difference between a parent and predecessor node in binary search tree?
Yes, it would work - you are correct. See here for definitions of predecessor and successor.
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
Nov 5th, 2009
0
Re: What's the difference between a parent and predecessor node in binary search tree?
Do not forget also the
Quote ...
Node root
Reputation Points: 123
Solved Threads: 106
Posting Pro
quuba is offline Offline
573 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Interestin dilemma - See if you can help :)
Next Thread in Java Forum Timeline: Error on repairing program





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC