Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- 블록몽키
- Blockmonkey
- 컴퓨터공학개론
- 제로초
- 생활코딩 nodejs
- hyperledger fabric
- vs code
- al
- mysql
- 블록체인
- 하이퍼레저
- 생활코딩
- DataStructure
- javascirpt
- 깃
- Javascript
- 블록체인개론
- algorithum
- js
- 자바스크립트
- 컴퓨터사이언스
- Nodejs 프로젝트
- SQL
- 파이썬 알고리즘
- javascript 초급
- 관계형데이터베이스
- nodejs
- hyperledger
- javascript 게임
- 프로그래밍
Archives
- Today
- Total
Blockmonkey
[AL&DS] 피보나치 본문
func fibonacciNumbers(n int) int {
//기저조건
if n <= 1 {
return 1
} else {
return fibonacciNumbers(n-1) + fibonacciNumbers(n-2)
}
}
// 피보나치 수열 항의 나열
func fibonacciNumbers2(n int) []int {
result := []int{0, 1}
for i := 0; i <= n; i++ {
temp := result[len(result)-1] + result[len(result)-2]
if temp > n {
break
}
result = append(result, temp)
}
return result
}'Web Development > CommonSense' 카테고리의 다른 글
| JWT TOKEN 저장 위치 비교 (2) | 2023.05.28 |
|---|---|
| [AL&DS] 팩토리얼 (0) | 2022.11.12 |
| [AL&DS] 큐 (0) | 2022.11.12 |
| [AL&DS] 스택 (0) | 2022.11.12 |
| [AL&DS] 삽입정렬 (0) | 2022.11.12 |