dubdub 0 Newbie Poster

So I am working on storing inorder traversal indices associated with every node in a BST (So if I add BAC, then the inorder index of A = 0, B = 1, C =2). The thing is that whenever you add a new node to a BST, you must recompute the the inorder traversal indices associated with each node. I am confused about the changes I need to make to a typical inorder traversal method in java so that it basically resets every time I want to add a new node?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.