-
-
Couldn't load subscription status.
- Fork 342
Wildcard algo #263
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
base: master
Are you sure you want to change the base?
Wildcard algo #263
Conversation
There was a problem hiding this 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 introduces several new algorithm implementations and example usages across dynamic programming and graph algorithms, notably adding wildcard pattern matching, bidirectional BFS, graph coloring, Dinic’s max flow, and Viterbi decoding.
- Adds wildcard pattern matching with DP, optimized DP, backtracking, and tests/examples
- Adds three graph algorithms: Bidirectional BFS, Graph Coloring (backtracking + greedy + Welsh-Powell), and Dinic’s Max Flow with examples
- Adds Viterbi (HMM) decoding with an example
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| dynamic_programming/wildcard_pattern_matching.r | Implements wildcard matching (DP, optimized, backtracking), helpers, and tests |
| graph_algorithms/bidirectional_bfs.r | Implements Bidirectional BFS with example; contains stray invalid return at end |
| graph_algorithms/graph_coloring.r | Implements backtracking coloring, greedy, Welsh-Powell, validator, examples |
| graph_algorithms/dinics_max_flow.r | Implements Dinic’s max flow, min cut helpers, and examples |
| dynamic_programming/viterbi.r | Implements Viterbi algorithm with example |
| et --soft HEAD~1 | Accidental commit of a git log dump; should not be in the repo |
Comments suppressed due to low confidence (1)
et --soft HEAD~1:1
- This appears to be an accidental commit of a git log dump; the filename is invalid and the content is not source code. Please remove this file from the PR.
�[33mcommit 7d4b7af52036b21abf54435f14250ef170351389�[m�[33m (�[m�[1;36mHEAD�[m�[33m -> �[m�[1;32mGraph_colouring�[m�[33m)�[m
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
et --soft HEAD~1:1
- This file 'et --soft HEAD~1' appears to be a Git command output file that was accidentally committed. This file should be removed from the repository as it contains git log information that is not part of the algorithm implementations and does not follow the repository's structure for algorithm files.
�[33mcommit 7d4b7af52036b21abf54435f14250ef170351389�[m�[33m (�[m�[1;36mHEAD�[m�[33m -> �[m�[1;32mGraph_colouring�[m�[33m)�[m
• Matches text strings against patterns with wildcards using dynamic programming
• Supports * (matches any sequence of characters) and ? (matches exactly one character)
• Implements standard DP, space-optimized, and backtracking approaches
• Returns TRUE/FALSE for pattern matching validation
• Includes helper functions for finding and counting matches
• Time complexity: O(m×n), Space: O(m×n) standard or O(n) optimized
• Features 15+ test cases with edge cases, file matching, and complex patterns
• Production-ready implementation for string pattern matching tasks