leetle

Daily challenge for 2026-07-03

549. Count Distinct Elements With Double

Given an integer array nums, return the number of distinct elements x such that 2 * x is also present in the array.

Example:
Input: nums = [1, 2, 4, 3]
Output: 2
Explanation: 1 has its double 2 present, and 2 has its double 4 present.

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