[Python3] Kadane's algo
This is based on @mzchen\'s solution here. \n\nclass Solution:\n    def kConcatenationMaxSum(self, arr: List[int], k: int) -> int:\n        rsm = val = 0 \n    
This is based on @mzchen\'s solution [here](https://leetcode.com/problems/k-concatenation-maximum-sum/discuss/382885/Short-and-concise-O(N)-C%2B%2B-solution). \n```\nclass Solution:\n    def kConcatenationMaxSum(self, arr: List[int], k: int) -> int:\n        rsm = val = 0 \n        sm = sum(arr)\n        if k > 1: arr *= 2\n        for x in arr: \n            val = max(0, val + x)\n            rsm = max(rsm, val)\n        return max(rsm, rsm + max(0, k-2)*sm) % 1_000_000_007\n```
['Python3']