Problem Link : Link
Pre-Requisite : None
Problem : You are given an unsorted array of integers. You have to find that all the elements are distinct or not.
Explanation : There are many approaches to solve this question. You can use std:set to store the elements of the array. If the size of the set is not equal to the size of the given array then there exists some element which occurs more than once.