leetle

Daily challenge for 2026-05-26

511. Unique Treasure Finder

You are given a list of treasure IDs found in a dungeon. Some treasures are common and appear multiple times, while others are rare and appear only once. Your task is to count how many unique treasure IDs appear exactly once in the list.

Example:
Input: ids = [10, 20, 10, 30, 20, 40]
Output: 2
(Explanation: 30 and 40 appear only once.)

Run this challenge interactively in Python or JavaScript when the app loads.