• Post Reply Bookmark Topic Watch Topic
  • New Topic

my coding is not deleting the node  RSS feed

 
Shital Joshi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You only provide half the code. Where's the code that calls deleteNode()?
 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you have bigger problems than just what calls deleteNode().

Your methods assume things about the nodes being passed in as parameters that I don't think are reasonable. Who's to say that the node being deleted has a previousNode? What are those statics in StrTree for? Is there really only one of those items in your system?

I would start by separating the concept of "tree" from the concept of "node" and go from there. What are you trying to do overall?

rc
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!