8000 feat: valid_anagram.cpp by sgindeed · Pull Request #3031 · TheAlgorithms/C-Plus-Plus · GitHub
[go: up one dir, main page]

Skip to content

Conversation

sgindeed
Copy link
@sgindeed sgindeed commented Oct 6, 2025

Description of Change

This pull request adds a new algorithm for checking if two strings are valid anagrams.

The implementation uses a hash table (std::unordered_map) to efficiently count and compare character frequencies. The file is self-contained and includes Doxygen-style documentation explaining the algorithm, along with a test() function to verify its correctness against various cases.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Adds a new, self-contained, and tested anagram checker algorithm.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0