Skip to content
CampusEduX

Find Duplicate Values

Easyjavapythonccppjavascript

Given an array, find every value that occurs more than once.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

Print the distinct duplicated values in increasing order, separated by single spaces. If there are none, print an empty line.

Related Problems

  • Frequency Map
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Common Elements in Three Arrays
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Pair with Given Difference
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...