Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 1 , 3 , 1 , 5 , 2 ] NEW_LINE n = len ( arr ) NEW_LINE dp = [ [ 0 for x in range ( MAX ) ] for y in range ( MAX ) ] NEW_LINE print ( solve ( dp , arr , 0 , n - 1 , 1 ) ) NEW_LINE DEDENT