<commit_before><commit_msg>add 053<commit_after>#!/usr/bin/env python


class Solution(object):

    def maxSubArray(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """

        acc = nums[:]
        v = nums[0]
        for i in range(1, len(nums)):
            temp = acc[i - 1] + nums[i]
            if temp < nums[i]:
                acc[i] = nums[i]
            else:
                acc[i] = temp

            if acc[i] > v:
                v = acc[i]

        return v

if __name__ == '__main__':
    arr = [-2, 1, -3, 4, -1, 2, 1, -5, 4]
    so = Solution()
    print(so.maxSubArray(arr))
{'fraction_non_alphanumeric': 0.15555555555555556, 'fraction_numerical': 0.023809523809523808, 'mean_word_length': 1.3901515151515151, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7439106', 'n_tokens_mistral': 245, 'n_tokens_neox': 227, 'n_words': 57}