Skip to content

feat: add Trie (prefix tree) data structure#5

Merged
kelsonbrito50 merged 1 commit intomainfrom
feat/trie-data-structure
Feb 27, 2026
Merged

feat: add Trie (prefix tree) data structure#5
kelsonbrito50 merged 1 commit intomainfrom
feat/trie-data-structure

Conversation

@kelsonbrito50
Copy link
Owner

Adds a full Trie implementation with:

  • Core: insert, search, delete, starts_with — all O(m)
  • Extended: count_prefix, autocomplete, longest_common_prefix
  • Wildcard search: pattern matching with . wildcard (LeetCode 211)
  • 20 tests covering all operations

…20 tests

- Insert, search, delete, starts_with — all O(m)
- count_prefix: count words sharing a prefix
- autocomplete: lexicographic suggestions with limit
- longest_common_prefix: shared prefix across all words
- search_wildcard: pattern matching with '.' wildcard (LeetCode 211)
- 20 comprehensive tests covering all operations
@kelsonbrito50 kelsonbrito50 merged commit 58ba53c into main Feb 27, 2026
2 checks passed
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