human
Maximum sum of a path in a Right Number Triangle | tri [ ] [ ] is a 2D array that stores the triangle , n is number of lines or rows ..
Adding the element of row 1 to both the elements of row 2 to reduce a step from the loop.
Traverse remaining rows.
Loop to traverse columns.
tri [ i ] would store the possible combinations of sum of the paths.
array at n - 1 index ( tri [ i ] ) stores all possible adding combination , finding the maximum one out of them.
driver program"
How can the above be solved in Python?

=====
Give me a code to maximum sum of a path in a Right Number Triangle and the other steps required?
assistant
#Here is code to maximum sum of a path in a Right Number Triangle and the other steps required.
 def maxSum ( tri , n ) :
	if n > 1 :
		tri [ 1 ] [ 1 ] = tri [ 1 ] [ 1 ] + tri [ 0 ] [ 0 ]
		tri [ 1 ] [ 0 ] = tri [ 1 ] [ 0 ] + tri [ 0 ] [ 0 ]
	for i in range ( 2 , n ) :
		tri [ i ] [ 0 ] = tri [ i ] [ 0 ] + tri [ i - 1 ] [ 0 ]
		tri [ i ] [ i ] = tri [ i ] [ i ] + tri [ i - 1 ] [ i - 1 ]
		for j in range ( 1 , i ) :
			if tri [ i ] [ j ] + tri [ i - 1 ] [ j - 1 ] >= tri [ i ] [ j ] + tri [ i - 1 ] [ j ] :
				tri [ i ] [ j ] = tri [ i ] [ j ] + tri [ i - 1 ] [ j - 1 ]
			else :
				tri [ i ] [ j ] = tri [ i ] [ j ] + tri [ i - 1 ] [ j ]
	print max ( tri [ n - 1 ] )
tri = [ [ 1 ] , [ 2 , 1 ] , [ 3 , 3 , 2 ] ]
maxSum ( tri , 3 )