Tap here to switch tabs
Problem
Submissions

Problem: Largest Unique Number

Largest Unique Number asks you to find the greatest value in an integer array that occurs exactly once, returning negative one when every value appears more than once.

Statement

Given an integer array nums, return the largest integer that appears exactly once. If no integer appears only once, return −1-1.

Constraints:

  • 1≤1 \leq nums.length ≤2000\leq 2000

  • 0≤0 \leq nums[i] ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Largest Unique Number

Largest Unique Number asks you to find the greatest value in an integer array that occurs exactly once, returning negative one when every value appears more than once.

Statement

Given an integer array nums, return the largest integer that appears exactly once. If no integer appears only once, return −1-1.

Constraints:

  • 1≤1 \leq nums.length ≤2000\leq 2000

  • 0≤0 \leq nums[i] ≤1000\leq 1000