본문 바로가기
728x90
반응형

분류 전체보기274

CI/CD CI/CD, or Continuous Integration and Continuous Delivery, automates the software development process from the initial code commit all the way through to deployment. It eliminates much of the manual human intervention traditionally required to get new code to production. This process takes care of building,testing, and deploying new code to production. The promise is that it enables software team.. 2024. 4. 8.
isTreeSymmetric 주어진 이진 트리가 중심을 기준으로 대칭인지 여부를 판단하는 문제입니다. 이를 확인하기 위해서는 각 측면이 서로 거울처럼 반영되는지 확인해야 합니다. 트리가 비어 있으면 대칭이라고 판단합니다. 그렇지 않은 경우, 왼쪽 서브트리와 오른쪽 서브트리를 비교하여 값이 같은지 확인합니다. 서브트리들이 대칭적으로 구성되어 있는지 재귀적으로 확인합니다. // // Binary trees are already defined with this interface: // class Tree { // public T value { get; set; } // public Tree left { get; set; } // public Tree right { get; set; } // } bool solution(Tree t) { .. 2024. 4. 5.
hasPathWithGivenSum 이진 트리에서 특정 합계를 갖는 경로가 있는지 확인하는 문제를 해결하는 함수입니다. 주어진 이진 트리는 각 노드가 정수 값을 가지고 있습니다. // // Binary trees are already defined with this interface: // class Tree { // public T value { get; set; } // public Tree left { get; set; } // public Tree right { get; set; } // } bool solution(Tree t, int s) { return hasPathWithGivenSum(t,s); } bool hasPathWithGivenSum(Tree t, int s){ if(t == null) return false; i.. 2024. 4. 2.
Kubernetes Kubernetes is an open-source container orchestration platform. It automates the deployment, scaling, and management of containerized applications. A Kubernetes cluster is a set of machines, called nodes, that are used to run containerized applications. There are two core pieces in a Kubernetes cluster. The first is the control plane. It is responsible for managing the state of the cluster. In PR.. 2024. 4. 1.
Async Functions in Javascript import React, { useState, useEffect } from 'react'; function DataFetcher() { const [data, setData] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { async function fetchData() { try { const data = await fetchData('https://api.example.com/data'); setData(data); setLoading(false); } catch (error) { setError(error); setLoadin.. 2024. 4. 1.
Process VS Thread Process example: Google Chrome uses Process isolation by running each tab in its own process. When one tab misbehaves due to a bug or a malicious attack, other tabs are unaffected. What is a thread? A thread is the unit of execution within a process. A process has at least on thread It is called the main thread. It is not uncommon for a process to have many threads. Each thread has its own stack.. 2024. 4. 1.
2089. Find Target Indices After Sorting Array 0으로 시작하는 정수 배열 nums와 목표 요소 target이 주어집니다. 목표 인덱스는 nums[i] == target인 인덱스 i입니다. nums를 비감소 순서로 정렬한 후 nums의 목표 인덱스 목록을 반환하십시오. 목표 인덱스가 없으면 빈 목록을 반환합니다. 반환된 목록은 증가 순서로 정렬되어야 합니다. 예를 들어: 예제 1: 입력: nums = [1,2,5,2,3], target = 2 출력: [1,2] 설명: 정렬 후, nums는 [1, 2, 2 ,3,5]입니다. nums[i] == 2인 인덱스는 1과 2입니다. 예제 2: 입력: nums = [1,2,5,2,3], target = 3 출력: [3] 설명: 정렬 후, nums는 [1,2,2, 3 ,5]입니다. nums[i] == 3인 인덱스는 .. 2024. 3. 27.
728x90
반응형