분류 전체보기
-
Thread & Process - 1TIL 2023. 12. 27. 04:55
프로세스와 스레드 개념 프로세스와 스레드에 대한 개념을 이해하기 쉽게 설명하면 다음과 같다: 프로세스 : 운영체제로부터 필요한 자원(메모리, CPU 시간 등)을 할당받아 작동하는, 독립적인 작업의 단위 스레드 (Thread): 프로세스 내에서 프로세스가 할당받은 자원을 사용하는 개별적인 실행 흐름의 단위 프로그램과 프로세스 정적 프로그램 프로그램은 실행 가능한 파일의 형태로 존재하는 코드의 집합이다. 예를 들어, 윈도우의 .exe 파일과 같은 형태로 저장되며, 아직 실행되지 않은 상태다. 프로세스 프로그램이 실행되면 프로세스가 됩니다. 이는 운영체제로부터 메모리와 CPU 자원을 할당받아 동적으로 실행되는 프로그램의 인스턴스다. 같은 프로그램이라도 여러 프로세스로 실행될 수 있다. 모든 프로그램은 운영체제..
-
리트코드 - 746. Min Cost Climbing Stairs코딩테스트 2023. 12. 27. 02:35
https://leetcode.com/problems/min-cost-climbing-stairs/description/?envType=study-plan-v2&envId=leetcode-75 Min Cost Climbing Stairs - LeetCode Can you solve this real interview question? Min Cost Climbing Stairs - You are given an integer array cost where cost[i] is the cost of ith step on a staircase. Once you pay the cost, you can either climb one or two steps. You can either start from the s..
-
리트코드 - 392. Is Subsequence코딩테스트 2023. 12. 25. 02:46
https://leetcode.com/problems/is-subsequence/description/?envType=study-plan-v2&envId=leetcode-75 Is Subsequence - LeetCode Can you solve this real interview question? Is Subsequence - Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be n leetcode.com 두 문자..
-
리트코드 - 643. Maximum Average Subarray I코딩테스트 2023. 12. 23. 17:38
https://leetcode.com/problems/maximum-average-subarray-i/description/?envType=study-plan-v2&envId=leetcode-75 Maximum Average Subarray I - LeetCode Can you solve this real interview question? Maximum Average Subarray I - You are given an integer array nums consisting of n elements, and an integer k. Find a contiguous subarray whose length is equal to k that has the maximum average value and retu..
-
리트코드 - 136. Single Number코딩테스트 2023. 12. 23. 02:30
https://leetcode.com/problems/single-number/description/ Single Number - LeetCode Can you solve this real interview question? Single Number - Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant leetcode.com 두 숫자의 Xor는 비트의 차이를 1로, 같은 비트를 0으로 나타낸다. 따라서 이를 사용하..
-
리트코드 - 104. Maximum Depth of Binary Tree코딩테스트 2023. 12. 23. 01:48
https://leetcode.com/problems/maximum-depth-of-binary-tree/description/ Maximum Depth of Binary Tree - LeetCode Can you solve this real interview question? Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf leetcode.com 이진 트리의 루트가 주어지면 그 ..
-
리트코드 - 933. Number of Recent Calls코딩테스트 2023. 12. 22. 01:56
https://leetcode.com/problems/number-of-recent-calls/?envType=study-plan-v2&envId=leetcode-75 Number of Recent Calls - LeetCode Can you solve this real interview question? Number of Recent Calls - You have a RecentCounter class which counts the number of recent requests within a certain time frame. Implement the RecentCounter class: * RecentCounter() Initializes the counter with ze leetcode.com ..