As a rule, you save the pointer back to the parent only if you intend to use algorithms that require it. Otherwise, this is unnecessary overhead both from the point of view of the memory used to store the pointer, and with the additional complexity of updating these pointers when inserting a node or rebalancing / reorganizing the tree.
Typical algorithms used with trees (width and depth search and traversal) do not require parent pointers, so your average realistic tree-like implementations usually don't include them.
Your request to “highlight the path from the root” can make parent pointers useful, although there are other ways to implement it. In general, adding redundant information to data structures should be avoided until it is proven that they are necessary to improve performance.
source share