Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Trie Data Structure with Case-Insensitive Feature and additional Test Cases #172

Merged
merged 50 commits into from
Oct 15, 2024

Conversation

Ramy-Badr-Ahmed
Copy link
Member

@Ramy-Badr-Ahmed Ramy-Badr-Ahmed commented Oct 11, 2024

Addendum to my #162:

  • Implemented case-insensitive handling in the Trie and TrieNode classes, normalizing characters to lowercase during insertion, search, and deletion. This allows for consistent behavior regardless of letter casing.

  • Enhanced the functionality and coverage of the Trie tests with additional edge cases:

    • Tests for insert() with mixed-case words, special characters, and long strings.
    • Tests for delete() with mixed-case words and special characters.
    • Tests for the startsWith with mixed-case inputs.
    • Tests for getRoot() before and after Trie population.
      This includes validating correct retrieval of the root node, validates it as an instance of TrieNode, and initially has no children.
      Tests the root node after inserting multiple words, verifying it has the expected children.
  • Added docblocks to each test method.


Reference

Data Structures and Algorithms in C++, 2nd Edition

Ramy-Badr-Ahmed and others added 30 commits August 24, 2024 21:17
Ramy-Badr-Ahmed and others added 20 commits September 22, 2024 14:01
…e Trie implementation. Added corresponding unit testing.
Copy link
Member Author

@Ramy-Badr-Ahmed Ramy-Badr-Ahmed left a comment

Choose a reason for hiding this comment

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

Hi @darwinz,
Looking forward to your review 🙂

PHP Composer

Code style

directory_md

Copy link
Contributor

@darwinz darwinz left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements, and adding additional test cases!

@darwinz darwinz merged commit 3360474 into TheAlgorithms:master Oct 15, 2024
2 checks passed
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.

2 participants