Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT str = " geekcodergeeks " NEW_LINE arr = [ 1 , 2 , 1 , 3 , 4 , 2 , 6 , 4 , 6 , 2 , 3 , 3 , 3 , 2 ] NEW_LINE n = len ( arr ) NEW_LINE print ( findCost ( str , arr , n ) ) NEW_LINE DEDENT