My C solution
\nint parent[100001];\n\nint find(int x)\n{\n    if(parent[x] == -1)\n        return x;\n    else \n        return parent[x] = find(parent[x]);\n}\nbool uni(int
```\nint parent[100001];\n\nint find(int x)\n{\n    if(parent[x] == -1)\n        return x;\n    else \n        return parent[x] = find(parent[x]);\n}\nbool uni(int a, int b)\n{\n    int x = find(a);\n    int y = find(b);\n    if(x != y)\n        parent[y] = x;\n    else \n        return false;\n    return true;\n}\n\nint largestComponentSize(int* nums, int numsSize){\n    int temp[100001] = {0};\n    int ret = 0;\n    for(int i = 0; i < 100001; i++)\n        parent[i] = -1;\n    for(int i = 0; i < numsSize; i++)\n        for(int j = 2; j*j <= nums[i]; j++)\n            if(nums[i] % j == 0)\n            {\n                uni(j, nums[i]);\n                uni(nums[i], nums[i]/j);\n            }\n    for(int i = 0; i < numsSize; i++)\n        ret = ret > ++temp[find(nums[i])] ? ret : temp[find(nums[i])];\n    return ret;\n}\n```
['Union Find', 'C']