Function to find the Duplicates , if duplicate occurs 2 times or more than 2 times in array so , it will print duplicate value only once at output
static void findDuplicates ( int [ ] arr , int len ) {