Is it a good idea to store a pointer to the parent node in a binary search rather than to find the parent node several times?
struct BSTNode
{
Node* leftChild;
Node* rightChild;
Node* parent; //nullptr for root
int data;
};
or
struct BSTNode
{
Node* leftChild;
Node* rightChild;
int data;
Node* findParent(Node* root);
};