Skip to content

Conversation

@sthuthi21
Copy link

Description

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

Issue Solved

Closes #8045

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.

Copilot AI review requested due to automatic review settings December 11, 2025 22:10
@CLAassistant
Copy link

CLAassistant commented Dec 11, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive documentation for the swap() method used with C++ unordered sets, providing both member and non-member function usage patterns.

Key Changes:

  • Documents both member function and non-member function syntax for swapping unordered sets
  • Includes two complete code examples demonstrating swap functionality with integer and string unordered sets
  • Explains constant-time complexity and iterator validity behavior after swapping

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mamtawardhani mamtawardhani self-assigned this Dec 12, 2025
Updated wording for clarity and consistency in the swap method documentation.
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 review! 🚀

mamtawardhani and others added 2 commits December 13, 2025 10:42
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: swap()

3 participants