first one solved
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```csharp []
public class Solution {
    public int MaximumSetSize(int[] nums1, int[] nums2) {
     var unique = new HashSet<int>();
        var common = new HashSet<int>();
        int halfMax = nums1.Length / 2;
        int uniqueCount = 0;

        // Process the first array
        for (int i = 0; i < nums1.Length; i++) {
            if (uniqueCount == halfMax)
                break;

            // If already exists in either set, skip
            if (unique.Contains(nums1[i]) || common.Contains(nums1[i]))
                continue;

            // If the element is in the second array, add to common set
            if (nums2.Contains(nums1[i])) {
                common.Add(nums1[i]);
            } else {
                // Otherwise, add to unique set and increment the count
                unique.Add(nums1[i]);
                uniqueCount++;
            }
        }

        // Reset unique count for the second array processing
        uniqueCount = 0;

        // Process the second array
        for (int i = 0; i < nums2.Length; i++) {
            if (uniqueCount == halfMax)
                break;

            // If already in common set, skip
            if (common.Contains(nums2[i]))
                continue;

            // If not in unique set, add to unique set and increment the count
            if (!unique.Contains(nums2[i])) {
                unique.Add(nums2[i]);
                uniqueCount++;
            }
        }

        // Calculate the total count of unique and common elements
        int totalCount = unique.Count + common.Count;

        // Return the minimum of totalCount and halfMax * 2
        return totalCount >= (halfMax * 2) ? halfMax * 2 : totalCount;
    }
}
```
['C#']