전체 글

전체 글

    [LeetCode] 11. Container With Most Water (Kotlin)

    https://leetcode.com/problems/container-with-most-water/ Container With Most Water - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com import kotlin.math.max import kotlin.math.min class Solution { fun maxArea(height: IntArray): Int { var answer = 0 var left = 0 var right = height.si..

    Apache Log4j RCE 제로데이 취약점

    2021년 12월 9일, Apache Log4j2의 원격 코드 실행 제로데이 취약점이 공개되었습니다. 공격자는 이 취약점을 이용해 원격 코드 실행을 트리거할 수 있습니다. 광범위한 영향을 끼치는 취약점이니 Log4j의 범위를 확인해보시고 버전을 업데이트하는 것이 좋겠습니다. 특히 SpringBoot의 경우 log4j를 기본적으로 갖고 있으니 꼭! 확인해보세요. 취약점 설명 Apache Log4j2는 Java 기반 로깅 라이브러리입니다. 정말 많은 시스템에서 사용되고 있죠. 대부분의 경우 사용자 입력으로 인한 오류 메시지를 로그에 기록할 때 사용하는데요. 공격자는 취약점을 통해 이 로깅 기능으로 원격 코드 실행을 트리거할 수 있습니다. 취약점 수준: 심각(치명적) 영향을 받는 버전: 2.0

    [LeetCode] 10. Regular Expression Matching (Kotlin)

    https://leetcode.com/problems/regular-expression-matching/ Regular Expression Matching - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { fun isMatch(s: String, p: String): Boolean { if (p.isEmpty()) { return s.isEmpty() } val isFirstMatch = s.isNotEmpty() && listOf..

    [LeetCode] 8. String to Integer (atoi) (Kotlin)

    https://leetcode.com/problems/string-to-integer-atoi/ String to Integer (atoi) - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { fun myAtoi(s: String): Int { var answer = "" var isFirstLeading = true var signNumber = 0 for (i: Int in s.indices) { val ch = s[i] if (..

    [LeetCode] 7. Reverse Integer (Kotlin)

    https://leetcode.com/problems/reverse-integer/ Reverse Integer - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com import kotlin.math.abs import kotlin.math.pow class Solution { fun reverse(x: Int): Int { var answer = 0 var xNum = x var cnt = abs(x).toString().length - 1 while (xNum ..