Solutions for Max from Subarray

    • @AaronSkake
    • @Daniel, submitted in Python 3, achived 100% score
    def solve(k,arr):
        max = 0
        n=len(arr)
        ls=[]
        for i in range(n - k + 1):
            max = arr[i]
            for j in range(1, k):
                if arr[i + j] > max:
                    max = arr[i + j]
            ls.append(max)
        return ls