
Lv 2. 피보나치 수
·
Algorithm & Data Structures/Programers
피보나치 수 관련 문제 재귀 로 푸는것 보다 DP 로 푸는것이 낫다. class Solution { public int solution(int n) { return fibo(n); } public int fibo(int n){ int[] num = new int[n+1]; num[0] = 0; num[1] = 1; for(int i = 2 ; i