• + 4 comments

    Swift way:

    print(apples.filter{$0 + a >= s && $0 + a <= t}.count)
    print(oranges.filter{$0 + b >= s && $0 + b <= t}.count)