I am working on RBTree deletion part for one of my assignment using Cormen as reference book. User will pass the key and data. The program should be able to search the whole tree for the given key-data pair and delete all their occurrences from the tree.
But I am getting segmentation fault while executing it.
Program should silently ignore errors (such as if a user tries to delete a node that doesn't exist). I am using successor and predecessor and to find additional matches. Segmentation fault also needs to be taken care over here.
This code piece is not working. Not getting how to accomplish my task from it. Definitely there could be better ways to achieve the task but I am not getting the point.Please help. Thanks in advance