kogorithm / kotlin-algorithm-01

0 stars 0 forks source link

데브 매칭 2022 #40

Open gongdongho12 opened 2 years ago

gongdongho12 commented 2 years ago
fun main(args: Array<String>) {
    val s = Solution()
//    println(s.solution(intArrayOf(3, 2, 3, 6, 4, 5)))
//    println(s.solution(intArrayOf(1, 1, 1, 1, 1)))
//    println(s.solution(intArrayOf(1, 2, 1, 3, 1)))
    println(s.solution(intArrayOf(1, 2, 2, 3, 1)))
}
gongdongho12 commented 2 years ago
fun main() {
    val s = Solution2()
    println(s.solution(4, true).map { it.contentToString() }.joinToString("\n"))
    println()
    println(s.solution(5, false).map { it.contentToString() }.joinToString("\n"))
}

class Solution2 {
    fun solution(n: Int, horizontal: Boolean): Array<IntArray> {
        return arrayOf(IntArrayOf())
    }
}