943,697 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1556
  • Java RSS
Mar 24th, 2009
0

Help explain successor binary search tree code thanks

Expand Post »
Binary Search tree help
Can somebody explain to me what this code is doing step by step?, thanks
java Syntax (Toggle Plain Text)
  1. TREE-SUCCESSOR(x)
  2. 1 if right[x] ≠ NIL
  3. 2 then return TREE-MINIMUM (right[x])
  4. 3 y ← p[x]
  5. 4 while y ≠ NIL and x = right[y]
  6. 5 do x ← y
  7. 6 y ← p[y]
  8. 7 return y
Reputation Points: 10
Solved Threads: 0
Light Poster
Dio1080 is offline Offline
47 posts
since Aug 2007
Mar 24th, 2009
0

Re: Help explain successor binary search tree code thanks

The code you have posted is not Java.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,757 posts
since May 2007
Mar 24th, 2009
0

Re: Help explain successor binary search tree code thanks

opps
Reputation Points: 10
Solved Threads: 0
Light Poster
Dio1080 is offline Offline
47 posts
since Aug 2007

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: Java webstart, round 1
Next Thread in Java Forum Timeline: Question for NetBeans users





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


Follow us on Twitter


© 2011 DaniWeb® LLC