Professional Documents
Culture Documents
#include <stdio.h>
#include <stdlib.h>
void merge(int arr[], int left[], int leftSize, int right[], int rightSize) {
int i = 0, j = 0, k = 0;
mergeSort(left, mid);
mergeSort(right, size - mid);
merge(arr, left, mid, right, size - mid);
}
return 1; // Unique
}
int main() {
int size, i;
char choice;
while (1) {
printf("Enter the size of the array: ");
scanf("%d", &size);
int arr[size];
if (isUnique(arr, size)) {
printf("All elements in the array are unique.\n");
} else {
printf("There are duplicate elements in the array.\n");
}
return 0;
}