graph/hierarchy_validation_utils library

Non-throwing check for parent-id hierarchies: cycles, self-parents and conflicting parents.

Classes

HierarchyValidation
Problem ids found by validateHierarchy.

Functions

validateHierarchy(List<HierarchyUtils> nodes) → HierarchyValidation
Checks nodes for the problems that make flattenHierarchy throw, and returns them instead of throwing. Runs in O(n).