As part of an assignment I have been asked to implement an in order traversal function for a binary search tree that permits visit to delete the node visited. Does the code that I have displayed meet his criteria?
I'm curious. The problem as stated is a bit vague. Do you need to perform a search, and delete only the data found? Or do you just need to traverse the tree and delete all nodes?
Your code does the latter. The original statement infers something closer to the former.