Search⌘ K
AI Features

Solution: Check If N and Its Double Exist

C# solution for the Check If N and Its Double Exist problem using the Hash Maps pattern.

Statement

Given an integer array arr, determine whether there exist two distinct indices i and j such that arr[i] is exactly double arr[j]. Return true if such a pair exists, otherwise return false.

Note: The indices i and j must be different.

Constraints:

  • 22 \leq ...