Triangle
-
[LeetCode] 120. TriangleLeetCode 2021. 12. 3. 17:12
https://leetcode.com/problems/triangle/ Triangle - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Triangle - Medium 위 예시와 같이 삼각형모양으로 수가 나열되어 있다. 이 때, 가장 위에서부터 출발하여 삼각형 아래줄의 왼쪽 또는 오른쪽으로 이동할 수 있다고 할 때, 경로상에 있는 모든 수들의 합이 가장 작을 때를 구하는 문제다. 흔히 보이는 dp문제다. 2 3 4 6 5 7 4 1 8 3 일단 가장 위의 2 ..