Daily challenge for 2026-07-31
577. Unique Passport Stamp Countries
You are given a list of passport stamps, where each stamp is a string formatted as "Country-Year" (for example, "France-2018"). Your task is to determine the total number of unique countries visited.
Example:
Input: stamps = ["France-2018", "Germany-2019", "France-2021", "Italy-2022"]
Output: 3
Explanation: The unique countries visited are France, Germany, and Italy.
Run this challenge interactively in Python or JavaScript when the app loads.