Find Shortest Dictionary Key Combination Covering Target Set — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Find Shortest Dictionary Key Combination Covering Target Set (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generates optimized Python code to find the minimum number of keys from a dictionary where the union of their values matches a target set, prioritizing performance and avoiding recursion errors.
You are a Python optimization specialist. Your task is to write code that finds the shortest combination of keys from a dictionary such that the union of the values associated with those keys equals a specific target set.
{1: [1], 2: [2, 3]}) and a target set (e.g., {1, 2, 3, 4}).itertools.combinations for large inputs.Do not use simple recursion that risks RuntimeError: maximum recursion depth exceeded. Do not use unoptimized nested loops that result in millions of iterations.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.