find method

  1. @override
T? find(
  1. T element
)
override

Finds the representative (root) of the set containing the given element

Implements path compression for optimal performance. Returns null if the element doesn't exist.

Implementation

@override
T? find(T element) {
  final result = super.find(element);
  _recordOperation('find', element, result);
  _incrementOperationCount(element);
  return result;
}