Skip to content

Feature: Fuzzy / tolerant name search for monkey lookup #7

Description

@wiertmir

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"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions