일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- 코드잇
- JavaScript
- TiL
- 방송대
- nestjs
- 꿀단집
- 99클럽
- 코딩테스트준비
- 중간이들
- 유노코딩
- 파이썬
- SQL
- mongoDB
- 코딩테스트
- node.js
- 프로그래머스
- Python
- 항해99
- Git
- Cookie
- CSS
- 개발자취업
- redis
- 엘리스sw트랙
- 방송대컴퓨터과학과
- 파이썬프로그래밍기초
- HTML
- 데이터베이스시스템
- aws
- 자격증
- Today
- Total
목록TiL (35)
배꼽파지 않도록 잘 개발해요

Find if Path Exists in Graph출처 : LeetCodeThere is a bi-directional graph with n vertices, where each vertex is labeled from 0 to n-1 (inclusive). The edges in the graph are represented as a 2D integer array edges, where each edges[i] = [ui, vi] denotes a bi-directional edge between vertex ui and vertex vi. Every vertex pair is connected by at most one edge, and no vertex has an edge to itself. Y..

Find Center of Star Graph출처 : LeetCodeThere is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph where there is one center node and exactly n - 1 edges that connect the center node with every other node. You are given a 2D integer array edges where each edges[i] = [ui, vi] indicates that there is an edge between the nodes ui and vi. Return the center of ..

Array Partition출처 : LeetCodeGiven an integer array nums of 2n integers, group these integers into n pairs (a1, b1), (a2, b2), ..., (an, bn) such that the sum of min(ai, bi) for all i is maximized. Return the maximized sum. Example 1: Input: nums = [1,4,3,2]Output: 4Explanation: All possible pairings (ignoring the ordering of elements) are:1. (1, 4), (2, 3) -> min(1, 4) + min(2, 3) = 1 + 2 = 32. ..

/** * @param {number} rowIndex * @return {number[]} */var getRow = function(rowIndex) { const row = [1]; for (let j = 1; j

/** * @param {number} numRows * @return {number[][]} */function generate(numRows) { // 첫 번째 행을 포함한 삼각형 초기화 const triangle = [[1]]; // 두 번째 행부터 numRows까지 각 행을 생성 for (let i = 1; i

function solution(n, lost, reserve) { // 여분의 체육복이 있는 학생과 잃어버린 학생의 교집합을 제거 let _lost = lost.filter(student => !reserve.includes(student)); let _reserve = reserve.filter(student => !lost.includes(student)); // 순서대로 정렬해주기 _lost = _lost.sort((a, b) => b - a); _reserve = _reserve.sort((a, b) => b - a); // 여분의 체육복을 가진 학생이 잃어버린 학생에게 체육복을 빌려줄 수 있는지 확인 for (let i = 0; i

function solution(k, m, score) { // m개씩 묶고, 1부터 k까지 있음. // score 내림차순 정렬, 크기가 m인 배열을 만들어서 순서대로 넣는다 // 이때 score에서 m개씩 나눴을 때 나머지는 버림. // 계산할 때는 크기가 m인 각 배열의 최저 점수 x m X 1 let answer = 0; // 각 배열마다의 점수 const sortedScore = score.sort((a, b) => b - a); for (let i = 0; i

// Interface for a binary tree node.interface TreeNode { val: number; left: TreeNode | null; right: TreeNode | null;}// Function to create a new TreeNode with a specific value.function createTreeNode(val: number, left: TreeNode | null = null, right: TreeNode | null = null): TreeNode { return { val: val, left: left, right: right };}let previousNode: TreeNode | ..

Binary Tree Inorder Traversal출처 : LeetCodeGiven the root of a binary tree, return the inorder traversal of its nodes' values. Example 1: Input: root = [1,null,2,3] Output: [1,3,2]Example 2:Input: root = [] Output: []Example 3:Input: root = [1] Output: [1] Constraints:The number of nodes in the tree is in the range [0, 100]. -100 오늘도 즐거운 리트코드 문제풀이 시간이다. 배열 문제를 주로 풀다가 트리 문제를 접하게 되니 접근 방식이 달라서 어렵..

최소 직사각형출처 : 프로그래머스 Lv.1문제 설명명함 지갑을 만드는 회사에서 지갑의 크기를 정하려고 합니다. 다양한 모양과 크기의 명함들을 모두 수납할 수 있으면서, 작아서 들고 다니기 편한 지갑을 만들어야 합니다. 이러한 요건을 만족하는 지갑을 만들기 위해 디자인팀은 모든 명함의 가로 길이와 세로 길이를 조사했습니다. 아래 표는 4가지 명함의 가로 길이와 세로 길이를 나타냅니다. 명함 번호 가로 길이 세로 길이 1 60 50 2 30 70 3 60 304 80 40가장 긴 가로 길이와 세로 길이가 각각 80, 70이기 때문에 80(가로) x 70(세로) 크기의 지갑을 만들면 모든 명함들을 수납할 수 있습니다. 하지만 2번 명함을 가로로 눕혀 수납한다면 80(가로) x 50(세로) 크기의 지갑..