목록분류 전체보기 (592)
넘치게 채우기
https://school.programmers.co.kr/learn/courses/30/lessons/64064 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr프로그래머스 - 불량 사용자문제 유형 : 백트래킹, dfs문제 난이도 : Level 3 문제개발팀 내에서 이벤트 개발을 담당하고 있는 "무지"는 최근 진행된 카카오이모티콘 이벤트에 비정상적인 방법으로 당첨을 시도한 응모자들을 발견하였습니다. 이런 응모자들을 따로 모아 불량 사용자라는 이름으로 목록을 만들어서 당첨 처리 시 제외하도록 이벤트 당첨자 담당자인 "프로도" 에게 전달하려고 합니다. 이 때 개인..
https://leetcode.com/problems/three-consecutive-odds/description/leetcode - Three Consecutive Odds문제 유형 : 그리디, 배열문제 난이도 : Easy 문제Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false.정수 배열 arr이 주어진다.홀수 3개가 붙어있으면 true를 반환하라.아니면 false를 반환하라. 풀이streak변수를 만들어서 몇 개 째 붙어 있는지 확인한다.3번붙은적있다면 True를, 그런일없이 배열을 순회하면 false를 반환한다. 코드C++#pragma..
https://leetcode.com/problems/remove-max-number-of-edges-to-keep-graph-fully-traversable/description/leetcode - Remove Max Number of Edes to Keep Graph Fully Traversable문제 유형 : 유니온-파인드, 그리디문제 난이도 : Hard 문제Alice and Bob have an undirected graph of n nodes and three types of edges:Type 1: Can be traversed by Alice only.Type 2: Can be traversed by Bob only.Type 3: Can be traversed by both Alice and..
https://leetcode.com/problems/all-ancestors-of-a-node-in-a-directed-acyclic-graph/description/leetcode - All Ancestros of a Node in a Directed Acyclic Graph문제 유형 : 위상 정렬문제 난이도 : Medium 문제You are given a positive integer n representing the number of nodes of a Directed Acyclic Graph (DAG). The nodes are numbered from 0 to n - 1 (inclusive).You are also given a 2D integer array edges, where edges[..
https://leetcode.com/problems/maximum-total-importance-of-roads/description/leetcode - Maximum Total Importance of Roads문제 유형 : 그리디, 우선순위 큐, 그래프문제 난이도 : Medium 문제You are given an integer n denoting the number of cities in a country. The cities are numbered from 0 to n - 1.You are also given a 2D integer array roads where roads[i] = [ai, bi] denotes that there exists a bidirectional road connecti..
https://leetcode.com/problems/find-center-of-star-graph/description/leetcode - Find Center of Star Graph문제 유형 : 그래프, 해시문제 난이도 : Easy 문제There 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[..
https://leetcode.com/problems/balance-a-binary-search-tree/description/leetcode - Balance a Binary Search Tree문제 유형 : 트리, 재귀, 이진트리, 이진탐색트리문제 난이도 : Medium 문제Given the root of a binary search tree, return a balanced binary search tree with the same node values. If there is more than one answer, return any of them.A binary search tree is balanced if the depth of the two subtrees of every node never..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/O8ThZ/btsIbrHqjCF/8ClLwSx0wtLYKx8cuTK0lK/img.png)
https://leetcode.com/problems/binary-search-tree-to-greater-sum-tree/description/leetcode - Binary Search Tree to Greater Sum Tree문제 유형 : 이진트리, 이진탐색트리, dfs문제 난이도 : Medium 문제Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus the sum of all keys greater than the original key in BST.As a reminder, a ..
https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/description/leetcode - Minimum Number of K Consecutive Bit Flips문제 유형 : 그리디 / 비트마스킹 / 슬라이딩 윈도우문제 난이도 : Hard 문제You are given a binary array nums and an integer k.A k-bit flip is choosing a subarray of length k from nums and simultaneously changing every 0 in the subarray to 1, and every 1 in the subarray to 0.Return the minim..
https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/description/leetcode - Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit문제 유형 : 슬라이딩 윈도우, 투 포인터, 데크(deque)문제 난이도 : Medium 문제Given an array of integers nums and an integer limit, return the size of the longest non-empty subarray such that the absolute difference betwee..