[LeetCode] 152. Maximum Product Subarray - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/maximum-product-subarray/ Maximum Product Subarray - 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 문제 Given an integer array nums, find a subarray that has the largest product, and return the product. The test cases are generated so that the answer w..
[LeetCode] 374. Guess Number Higher or Lower - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/guess-number-higher-or-lower/description/ Guess Number Higher or Lower - 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 문제 We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Eve..
[Linux] 여러 프로세스의 PID를 조회하여 한번에 종료하기
·
개발/Linux
회사 프로젝트에서 사용하고 있는 톰캣서버에서 ps 명령어로 톰캣의 프로세스를 조회하다 아래와 같은 상황을 발견했다. 어떠한 이유에서인지 서버는 종료되었으나 프로세스는 종료되지 않고 남아 여러개의 톰캣 프로세스가 쌓여있는 상태이다. 프로세스가 여러개 올라가 있어도 서버는 정상적으로 실행되고 있었으나 나중에 문제가 발생할 가능성이 있기에 종료되지 않은 프로세스들은 정리해주기로 했다. 명령어 kill -9 `ps -ef | grep java | grep tomcat | awk '{print $2}'` kill -9 [PID] : 프로세스의 PID로 해당 프로세스를 강제종료 백틱( ` ) : 백틱안의 명령어를 실행한 출력값을 사용 ps -ef : 모든 프로세스를 full format으로 출력 파이프라인( | )..
[LeetCode] 222. Count Complete Tree Nodes - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/count-complete-tree-nodes/ Count Complete Tree Nodes - 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 문제 Given the root of a complete binary tree, return the number of the nodes in the tree. According to Wikipedia, every level, except possibly the las..
[LeetCode] 53. Maximum Subarray - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/maximum-subarray/ Maximum Subarray - 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 문제 Given an integer array nums, find the subarray which has the largest sum and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation:..
HYOJUN
도전하고 기록하기