[#BloombergLP-bslstl-HashTable-countElementsInBucket]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable.adoc[HashTable]::countElementsInBucket
:relfileprefix: ../../../
:mrdocs:

Return the number of elements in the bucket at `index`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;hashtable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/HashTable/SizeType.adoc[HashTable&lt;KEY&lowbar;CONFIG, HASHER, COMPARATOR, ALLOCATOR&gt;::SizeType]
countElementsInBucket(xref:BloombergLP/bslstl/HashTable/SizeType.adoc[SizeType] index) const;
----

== Description

Return the number elements contained in the bucket at the specified `index`&period; Note that this operation has linear run&hyphen;time complexity with respect to the number of elements in the indexed bucket&period;

== Return Value

number of elements in the bucket at `index`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *index*
| bucket index
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
