Print All Distinct Elements of a Given Integer Array
Given an integer array, print all distinct elements in the array. The given array may contain duplicates and the output should print every element only once. The given array is not sorted. Example Input: nums[]= {12, 10, 9, 45, 2, 10, 10, 45} Output: 12, 10, 9, 45, 2 Approach …