Driver Code
arr = [ 1 , 2 , 4 , 3 , 2 , 4 , 1 ] NEW_LINE n = len ( arr ) NEW_LINE K = 7 NEW_LINE ln = subArraylen ( arr , n , K ) NEW_LINE if ( ln == sys . maxsize ) : NEW_LINE INDENT print ( " - 1" ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ln ) NEW_LINE DEDENT