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 |
Tags
- heap
- Kotlin
- booleanarray
- 동적계획법
- report
- PriorityQueue
- 프로그래머스
- solution
- lastIndex
- Queue
- 코틀린
- Poll
- Developer
- programmers
- 알고리즘
- 2020
- Main
- Util
- GREEDY
- contentToString
- indices
- sortedBy
- intarray
- 2D Array
- dynamic programming
- hackerrank
- foreach
- Recursion
- dp
- Java
Archives
- Today
- Total
목록Recursion (1)
Code in
프로그래머스 깊이/너비 우선 탐색 타깃 넘버 문제입니다. IntelliJ에서의 풀이입니다. val numbers: IntArray = intArrayOf(1, 1, 1, 1, 1) val target: Int = 3 fun solution(numbers: IntArray, target: Int): Int { val arr: ArrayList = ArrayList() recursion(0, numbers, numbers[0], target, arr) recursion(0, numbers, numbers[0]*-1, target, arr) return arr.size } fun recursion(curIndex: Int, numbers: IntArray, curNum: Int, target: Int, arr..
알고리즘 스터디_문제풀이
2020. 8. 25. 13:46