ShareCopy to ClipboardRawPreviewfor (i = 0; i < n; i++){ cnt = 1; for (j = i + 1; j < n; j++){ if (array[i] == array[j]){ cnt++; temp[j] = 0; } } if (temp[i] != 0){ temp[i] = cnt; } } Cide00Yatharth Garg0 CommentsAdd CommentLog in to add a comment