When a node has been changed, using the index of that node, move up through the tree to update all of the nodes on the way.
Build the function using the tag
int update(vector<DataEntry> & data, int index)
The function should return the index of the parent node of the node referenced by the index passed by the function. The exit condition is when the index = 0 (when the root has been reached).
Call the functions to set the RHASH, LHASH, RHIST, and LHIST vectors within the DataEntry stored at data[index]
When a node has been changed, using the index of that node, move up through the tree to update all of the nodes on the way.
Build the function using the tag
int update(vector<DataEntry> & data, int index)
The function should return the index of the parent node of the node referenced by the index passed by the function. The exit condition is when the index = 0 (when the root has been reached).
Call the functions to set the RHASH, LHASH, RHIST, and LHIST vectors within the
DataEntry
stored atdata[index]