count method

int count(
  1. K key
)

Returns the number of values associated with the exact key. Time complexity: O(log N).

Implementation

int count(K key) {
  return _container[key]?.length ?? 0;
}