climbing stairs (1) 썸네일형 리스트형 LeetCode: 70번 (Climbing Stairs) [JAVA] 문제 링크 https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 풀이 전체적인 풀이 과정은 다음과 같다. 주어진 길이 n만큼의 누적 값 저장 배열을 생성 배열의 첫 번째 위치에 1, 두 번째 위치에 2를 저장 (만약 n값이 1, 2라면 해당 값을 그대로 반환) 이후 반복문을 통해 점화식 (a[n] = a[n-1] + a[n-2])를 바탕으로 배열을 초기화.. 이전 1 다음