0 out of 464 challenges solved

Largest Divisible Subset

Write a function `largest_subset(numbers: List[int]) -> int` that takes a list of integers and returns the size of the largest subset such that for every pair `(a, b)` in the subset, either `a % b == 0` or `b % a == 0`.

#### Example Usage
```python [main.nopy]
largest_subset([1, 3, 6, 13, 17, 18])  # Output: 4
largest_subset([10, 5, 3, 15, 20])      # Output: 3
largest_subset([18, 1, 3, 6, 13, 17])  # Output: 4
```

#### Constraints
- The input list will contain at least one number.
- All numbers in the list are positive integers.
from typing import List

def largest_subset(numbers: List[int]) -> int:
    """
    Find the size of the largest subset of numbers such that every pair is divisible.
    
    Args:
    numbers (List[int]): A list of positive integers.

    Returns:
    int: The size of the largest divisible subset.
    """
    # Placeholder for the solution
    pass