일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- programmers
- Kotlin
- heap
- Main
- Java
- 2020
- 동적계획법
- contentToString
- 프로그래머스
- 코틀린
- Queue
- report
- dynamic programming
- intarray
- dp
- lastIndex
- 알고리즘
- foreach
- Developer
- GREEDY
- PriorityQueue
- Util
- hackerrank
- sortedBy
- 2D Array
- solution
- booleanarray
- Poll
- Recursion
- indices
- Today
- Total
목록booleanarray (2)
Code in

프로그래머스 깊이/너비 우선 탐색 네트워크 문제입니다. IntelliJ에서의 풀이입니다. val n = 3 val computers = arrayOf(intArrayOf(1, 1, 0), intArrayOf(1, 1, 0), intArrayOf(0, 0, 1)) val computers2 = arrayOf(intArrayOf(1, 1, 0), intArrayOf(1, 1, 1), intArrayOf(0, 1, 1)) fun solution(n: Int, computers: Array): Int { var answer = 0 val visited = Array(n) { BooleanArray(n){false} } for (i in 0 until n){ if (!visited[i][i]){ network(c..

프로그래머스 완전 탐색 부분 소수 찾기 문제입니다. IntelliJ에서의 풀이입니다. isPrime 참고: https://www.geeksforgeeks.org/sieve-of-eratosthenes/ Sieve of Eratosthenes - GeeksforGeeks Sieve of Eratosthenes - The sieve of Eratosthenes is one of the efficient ways to find all primes smaller than given n www.geeksforgeeks.org import kotlin.math.log10 import kotlin.math.pow val numbers: String = "011" fun solution(numbers: String):..