from typing import Any


def is_subsequence(array: list[Any], sub: list[Any]) -> bool:
    """
    decide if sub is a subsequence of array
    """
    if not array or not sub:
        return False
    if array == sub:
        return True
    if len(array) < len(sub):
        return False
    for i in range(len(array)):
        for j in range(len(sub)):
            if i + j >= len(array):
                break
            if array[i + j] != sub[j]:
                break
            if j == len(sub) - 1:
                return True
    return False