from typing import List


def find_max_subarray_bruteforce(sequence: List[int]):
    """Brute force implementation of the maximum subarray problem"""
    max_sum = float("-inf")

    for left_index in range(len(sequence)):

        curr_sum = 0
        for right_index in range(left_index, len(sequence)):
            curr_sum += sequence[right_index]
            max_sum = max(max_sum, curr_sum)

    return max_sum