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.

}

// Use a hash map to store character frequencies.
std::unordered_map<char, int> counts;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think character frequency could be negative, use an unsigned integer here, fixed width.

@github-actions
Copy link
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Author has not responded to the comments for over 2 weeks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants