Implement a program to remove duplicates from an array.
HardProblem Statement
Implement a program to remove duplicates from an array.
Sample Input
arr = {1, 2, 3, 2, 4, 1}Sample Output
Array after removing duplicates: 1 2 3 4
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3, 2, 4, 1};
int size = sizeof(arr) / sizeof(arr[0]);
// Logic to remove duplicates
return 0;
}
Input
arr = {1, 2, 3, 2, 4, 1}Expected Output
Array after removing duplicates: 1 2 3 4