Breached password detector

Write codeEasy10 min

Your task

Check submitted passwords against a known-breached set. Given a list of candidate passwords and a breached_set list of passwords known to be compromised, return a list of booleans (same length and order as passwords) where each entry is True if that password appears in the breached set and must be rejected. An empty password list returns an empty list.

Examples

check_breached(passwords: list[str], breached_set: list[str]) -> list[bool]
Example 1
Inputcheck_breached(["abc", "secure1", "123456"], ["123456", "password", "abc"])
Output[True, False, True]