if not a power of 2 then move side - wise
else : NEW_LINE INDENT dp [ m ] [ n ] = ( a [ m ] [ n ] + max ( maxCost ( a , m - 1 , n , dp ) , maxCost ( a , m , n - 1 , dp ) ) ) ; NEW_LINE return dp [ m ] [ n ] ; NEW_LINE DEDENT