Skip to content
CampusEduX

Find the Unique Element

Easyjavapythonccppjavascript

Every element in an array appears exactly twice except one element, which appears once. Find the element that appears only once.

Input Format

The first line contains an integer N (N is odd). The second line contains N space-separated integers.

Output Format

Print the element that appears exactly once.

Related Problems

  • Find the Largest Element
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Find the Smallest Element
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Find the Second Largest Element
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...