목록PS (883)
넘치게 채우기
https://leetcode.com/problems/ugly-number-ii/description/?envType=daily-question&envId=2024-08-18leetcode - Ugly Number II문제 유형 : 우선순위 큐, 수학, 구현문제 난이도 : Medium 문제An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5.Given an integer n, return the nth ugly number. ugly number는 2,3,5만을 소인수로 갖는 양의 정수이다.n이 주어지면, n번째 ugly number를 구하시오. 풀이1은 2, 3, 5를 각각 0개씩 갖고 있는 양의 정수이므로..
https://leetcode.com/problems/maximum-number-of-points-with-cost/description/?envType=daily-question&envId=2024-08-17 leetcode - Maximum Number of Points with Cost문제 유형 : 다이나믹 프로그래밍문제 난이도 : Medium 문제You are given an m x n integer matrix points (0-indexed). Starting with 0 points, you want to maximize the number of points you can get from the matrix.To gain points, you must pick one cell in each ..
https://school.programmers.co.kr/learn/courses/30/lessons/12938 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr프로그래머스 - 최고의 집합문제 유형 : 수학, 구현, 그리디문제 난이도 : Level 3 문제 설명자연수 n 개로 이루어진 중복 집합(multi set, 편의상 이후에는 "집합"으로 통칭) 중에 다음 두 조건을 만족하는 집합을 최고의 집합이라고 합니다.각 원소의 합이 S가 되는 수의 집합위 조건을 만족하면서 각 원소의 곱 이 최대가 되는 집합예를 들어서 자연수 2개로 이루어진 집합 중 합이 9가 되는..
https://leetcode.com/problems/lemonade-change/description/?envType=daily-question&envId=2024-08-15leetcode - Lemonade Change문제 유형 : 그리디문제 난이도 : Easy 문제At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you and order one at a time (in the order specified by bills). Each customer will only buy one lemonade and pay with either a $5, $10, or $20 bill. You must..
https://leetcode.com/problems/find-k-th-smallest-pair-distance/description/?envType=daily-question&envId=2024-08-14leetcode - Find K-th Smallest Pair Distance문제 유형 : 투 포인터, 이진탐색문제 난이도 : Hard 문제The distance of a pair of integers a and b is defined as the absolute difference between a and b.Given an integer array nums and an integer k, return the kth smallest distance among all the pairs nums[i] a..
https://leetcode.com/problems/combination-sum-ii/description/?envType=daily-question&envId=2024-08-13leetcode - Combination Sum II문제 유형 : 백트래킹, dfs, 재귀문제 난이도 : Medium 문제Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target.Each number in candidates may only be used once in the combin..
https://leetcode.com/problems/minimum-number-of-days-to-disconnect-island/description/leetcode - Minimum Number of Days to Disconnect Island문제 유형 : bfs / dfs, 그리디문제 난이도 : Hard 문제You are given an m x n binary grid grid where 1 represents land and 0 represents water. An island is a maximal 4-directionally (horizontal or vertical) connected group of 1's.The grid is said to be connected if we have e..
https://leetcode.com/problems/kth-largest-element-in-a-stream/description/?envType=daily-question&envId=2024-08-12leetcode = Kth Largest Element in a Stream문제 유형 : 우선순위 큐문제 난이도 : Easy 문제Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.Implement KthLargest class:KthLargest(int k, int[] nums) Initi..
https://leetcode.com/problems/magic-squares-in-grid/description/?envType=daily-question&envId=2024-08-09leetcode - Magic Squares In Grid문제 유형 : 행렬문제 난이도 : Medium 문제A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum.Given a row x col grid of integers, how many 3 x 3 contiguous magic square subgrids are..

https://leetcode.com/problems/spiral-matrix-iii/submissions/1348374879/leetcode - Spiral Matrix III문제 유형 : 행렬, 구현문제 난이도 : Medium 문제You start at the cell (rStart, cStart) of an rows x cols grid facing east. The northwest corner is at the first row and column in the grid, and the southeast corner is at the last row and column.You will walk in a clockwise spiral shape to visit every position in thi..