Output

Duplicate Element : def
Duplicate Element : xyz

Explanation:

In this program, we compare each and every element of an array with other elements. If the program founds any two elements are equal, the program declare them as duplicates. Time Complexity of this program is O(n^2).