I have a graph with disjoint sets of nodes connected indirectly with a reference as shown below. Given an id is it possible to get the leaf node when the depth is unknown?
[
{ id: A, child: { ref: B } },
{ id: B, child: { ref: C } },
{ id: C, child: { ref: D } },
.
.
{ id: Y, child: { ref: Z } }
]
[cid:[email protected]]
Thanks,
Sravani
