• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connecting siblings in a binary tree  RSS feed

 
Prasanna Raman
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I've tried to connect all the nodes in the tree to their immediate siblings.

For example, root.nextSibling should be null. If root has 2 children "a" and "b", a.nextSibling should be "b" and b's should be null. Please review the code and let me know if there is a better way of implementing this.





 
Prasanna Raman
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Sorry, how do I delete this post?

Thanks,
Prasanna
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!