def number_of_ways_general(n, steps):
    """
    *** 'Amazon' interview question ***
    Staircase problem with allowed steps given in a set.
    Problem statement and more details: https://youtu.be/5o-kdjv7FD0
    """
    if n == 0:
        return 1

    nums = [0] * (n + 1)
    nums[0] = 1

    for i in range(1, n + 1):
        total = 0
        for j in steps:
            if i - j >= 0:
                total += nums[i - j]
        nums[i] = total

    return nums[n]