Skip to main content

std::unordered_set bucket_size() method

// Const version only
size_type bucket_size( size_type n ) const;

Returns the number of elements in the bucket with index n.

Parameters

  • n - the index of the bucket to examine

Return value

The number of elements in the bucket n.

Complexity

Linear in the size of the bucket n - O(N), where N is the size of bucket n.

Exceptions

(none)

Examples

important

This section requires improvement. You can help by editing this doc page.

This article originates from this CppReference page. It was likely altered for improvements or editors' preference. Click "Edit this page" to see all changes made to this document.
Hover to see the original license.

std::unordered_set bucket_size() method

// Const version only
size_type bucket_size( size_type n ) const;

Returns the number of elements in the bucket with index n.

Parameters

  • n - the index of the bucket to examine

Return value

The number of elements in the bucket n.

Complexity

Linear in the size of the bucket n - O(N), where N is the size of bucket n.

Exceptions

(none)

Examples

important

This section requires improvement. You can help by editing this doc page.

This article originates from this CppReference page. It was likely altered for improvements or editors' preference. Click "Edit this page" to see all changes made to this document.
Hover to see the original license.