Unique Maximum Number
Practice
3.8 (12 votes)
Hash table
Hashmap
Basic programming
Easy
Open
Approved
Problem
73% Success 6258 Attempts 20 Points 5s Time Limit 256MB Memory 1024 KB Max Code
Given an array A. Find the highest unique element in array A. Unique element means that element should present only once in the array.
Input:
First line of input contains N, size of array A. Next line contains N space separated elements of array A.
Output:
Print highest unique number of array A. If there is no any such element present in array then print -1.
Constraints:
1 ≤ N ≤ 106
0 ≤ Ai ≤ 109
Submissions
Please login to view your submissions
Similar Problems
Points:20
154 votes
Tags:
EasyOpenHash functionHash table
Points:20
5 votes
Tags:
Hash functionBasic ProgrammingString-ManipulationHash tableBasic-ProgrammingOpenApprovedEasy
Points:20
6 votes
Tags:
Dynamic ProgrammingHash functionImplementationData StructuresAlgorithmsHash tableOpenApprovedEasy
Editorial