• Post Reply Bookmark Topic Watch Topic
  • New Topic

AVL Tree Null pointer error  RSS feed

 
benjamin parker
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to write a self balancing binary search tree using AVL.It will do a self balance check after every insertion. Currently i am facing null pointer exception after the third insertion. could anyone point me where am i making a mistake as i can't seem to figure it out

 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which line does the Exception occur on? What object references appear on that line? Have you printed them all to confirm which of them is null?
 
benjamin parker
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Which line does the Exception occur on? What object references appear on that line? Have you printed them all to confirm which of them is null?

i think i have solved this, i need help in resolving this now http://www.coderanch.com/t/638834/java/java/Recursion
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And which reference pointed to null?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!