Does the term “predecessor” have a node node that IMMEDIATELY precedes this node (that is, it is the parent of the node) or refers to a node at a distance k above that node where k> = 1.
From Wikipedia:
If v is reachable from u, then u is the predecessor of v and v is the successor of u. If there is an arc from u to v, then u is the direct predecessor of v, and v is the direct descendant of u.
I assume that the predecessors of a node are its parent and the predecessors of this parent.
Do you have context for using the predecessor?