findParentCached method
O(1) lookup of the parent id of childId.
Returns null if childId is the root or not found.
Implementation
String? findParentCached(String childId) {
if (_parentCacheDirty) _rebuildNodeIndex();
return _parentCache[childId];
}