The university gave the following task:
Write a program to work on operator requests with an ordered table, implemented as a binary search tree with firmware.
Key is an integer. Information - a string of arbitrary length.
The tree node contains a key, pointers to the right and left subtrees, a pointer to the next node in the reverse order of the keys and a pointer to the information field.
When performing a delete and add operation, the tree should not lose order.
I have the following questions:
What is the pointer to the next node in reverse order? Those. is it a pointer to the previous node?
How can I maintain tree ordering when deleting and adding an item?
How rational is the following idea: To bypass the modified tree and build a new tree from it?
Do I understand correctly that by firmware is meant the link of leaf pointers to the root of a tree?