from typing import Sequence
from typing import Tuple
import math


def split_data(n: int, folds: int) -> Sequence[Tuple[int, int]]:
    """
    Return list of tuples with array index for each fold.
    """
    s = math.ceil(n / folds)
    splits = []
    for i in range(folds):
        a = i * s
        b = min((i + 1) * s, n)
        splits.append((a, b))
    return splits