from typing import List


def max_array_sum(arr: List[int]) -> int:
    """
    Return the maximum sum of an array subset of non-adjacent items.

    :time: O(n)
    :space: O(n)
    """
    max_sum = [0] * (len(arr) + 2)
    for i, num in enumerate(arr, start=2):
        max_sum[i] = max(max_sum[i - 2] + num, max_sum[i - 1])
    return max_sum[-1]