Skip to content

Conversation

@AliNasser05
Copy link

Description

[Term Entry] C++ Unordered-sets :max_load_factor()

Issue Solved

Closes #8055

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

Added documentation for the max_load_factor() method in unordered_set.
Clarified the description of the max_load_factor method and its behavior regarding load factor and hash collisions.
@CLAassistant
Copy link

CLAassistant commented Jan 12, 2026

CLA assistant check
All committers have signed the CLA.

@mamtawardhani mamtawardhani self-assigned this Jan 13, 2026
Updated the description of the max_load_factor method and clarified its functionality. Enhanced example code to demonstrate setting and modifying the maximum load factor.
This example shows how to read and set the maximum load factor and how it influences bucket allocation. `rehash()` is used to start with fewer buckets so the effect is easier to observe.
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good for a second round of review! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Term Entry] C++ Unordered-sets :max_load_factor()

3 participants