Solved min path triangle problem