Question: 
Write a python function to find the minimun number of subsets with distinct elements.


Model's Code:
def subset(arr, n):
    distinct_elements = len(set(arr))
    return (n + distinct_elements - 1) // distinct_elements



Sample Correct Code:
def subset(ar, n): 
    res = 0
    ar.sort() 
    for i in range(0, n) : 
        count = 1
        for i in range(n - 1): 
            if ar[i] == ar[i + 1]: 
                count+=1
            else: 
                break 
        res = max(res, count)  
    return res 


Asserts:
assert subset([1, 2, 3, 4],4) == 1
assert subset([5, 6, 9, 3, 4, 3, 4],7) == 2
assert subset([1, 2, 3 ],3) == 1


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 953 of 974: 730/953 (76.60020986358866%): success