Daily challenge for 2025-12-25
359. First Value Matching Its Frequency
Given an array of integers nums, find the first element x in the array such that the frequency of x (the number of times it appears in the array) is exactly equal to x. If no such element exists, return -1.
Example:Input: nums = [2, 2, 3, 3, 3] Output: 2
Run this challenge interactively in Python or JavaScript when the app loads.