count method

int count(
  1. T element
)

Returns the number of occurrences of element in the set. Time complexity: O(log N).

Implementation

int count(T element) {
  return _container[element] ?? 0;
}