• + 0 comments

    int i, pair=0, temp, j, count=1; // sorting the array first for(i=0;iar[j+1]){ temp=ar[j]; ar[j]=ar[j+1]; ar[j+1]=temp; } } } // searching the occurrence of a color for(i=0;i