k-th distinct (or non-repeating) element among unique elements in an array.
Given an integer array arr[], print kth distinct element in this array. The given array may contain duplicates and the output should print the k-th element among all unique elements. If k is more than the number of distinct elements, print -1. Examples: Input: arr[] = {1, 2, 1, 3, 4, 2}, k = 2Output