• Post Reply Bookmark Topic Watch Topic
  • New Topic

why the reference Node doesn't change it value in this binary search tree ?  RSS feed

 
Dan D'amico
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EDIT : i solved it , i drew it wrong, i should have drew an arrow from parent to root . (picture 2 )

the problem was :

i wrote it on paper with my examples.
and just for laughts , i uploaded another picture that dont belong to my problem. its just my way to understand binary search tree implementation , so i wanted so share.

just for laught : looks like the map of the universe.


now my problem : why after i changed Current to Current.left, Parent still has the value of root. i draw and wrote it on a paper. to be clear as possible - picture 2 :


 
Liutauras Vilda
Sheriff
Posts: 4917
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dan D'amico wrote:why after i changed Current to Current.left, Parent still has the value of root


My observations, based on your statements:


Because

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!