one interview question, very difficult, smart people can do# JobHunting - 待字闺中
g*g
1 楼
TRIANGLE PUZZLE
By starting at the top of the triangle and moving to adjacent numbers on the
row below, the maximum total from top to bottom is 27..
5
9 6
4 6 8
0 7 1 5
I.e. 5 + 9 + 6 + 7 = 27.
Write a program in a language of your choice to find the maximum total from
top to bottom in triangle.txt, a text file containing a triangle with 100
rows.
download traiangle.txt in http://www.yodle.com/downloads/puzzles/triangle.txt
who can fix this problem? It is very difficult. Please post your answer
By starting at the top of the triangle and moving to adjacent numbers on the
row below, the maximum total from top to bottom is 27..
5
9 6
4 6 8
0 7 1 5
I.e. 5 + 9 + 6 + 7 = 27.
Write a program in a language of your choice to find the maximum total from
top to bottom in triangle.txt, a text file containing a triangle with 100
rows.
download traiangle.txt in http://www.yodle.com/downloads/puzzles/triangle.txt
who can fix this problem? It is very difficult. Please post your answer