Goal
Improve lookup by supporting substring and fuzzy matches (case-insensitive) so users can find monkeys with inexact names.
Why
Better UX for interactive search; tolerates typos.
Light implementation notes
- Add
SearchHelper with FindBestMatch(string query, IEnumerable<Monkey> monkeys).
- Implement a simple score: exact match > starts-with > contains > small edit-distance (Levenshtein) threshold. For tiny data sets compute edit distance in O(n*m) fine here.
- Return the best match or null when below threshold; present alternatives when multiple near-matches exist.
- Add unit tests for matching logic with sample inputs.
Files to modify/create
- MyMonkeyApp/Helpers/SearchHelper.cs
- MyMonkeyApp/Program.cs (use helper for
details <name> command)
Labels:["enhancement","feature-request","good first issue","area-console"]
Goal
Improve lookup by supporting substring and fuzzy matches (case-insensitive) so users can find monkeys with inexact names.
Why
Better UX for interactive search; tolerates typos.
Light implementation notes
SearchHelperwithFindBestMatch(string query, IEnumerable<Monkey> monkeys).Files to modify/create
details <name>command)Labels:["enhancement","feature-request","good first issue","area-console"]