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
- 코틀린
- 동적계획법
- sortedBy
- GREEDY
- Developer
- Kotlin
- 2D Array
- 알고리즘
- lastIndex
- dp
- contentToString
- foreach
- dynamic programming
- Main
- hackerrank
- heap
- Recursion
- Queue
- solution
- report
- booleanarray
- programmers
- 프로그래머스
- Poll
- Java
- Util
- indices
- 2020
- intarray
- PriorityQueue
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