목록다시볼문제 (123)
넘치게 채우기
https://leetcode.com/problems/modify-graph-edge-weights/description/?envType=daily-question&envId=2024-08-30leetcode - Modift Graph Edge Weights문제 유형 : 우선순위 큐, 다익스트라, 최단거리문제 난이도 : Hard 문제You are given an undirected weighted connected graph containing n nodes labeled from 0 to n - 1, and an integer array edges where edges[i] = [ai, bi, wi] indicates that there is an edge between nodes ai and bi w..
https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/description/?envType=daily-question&envId=2024-08-29leetcode - Most Stones Removed with Same Row or Column문제 유형 : 유니온-파인드문제 난이도 : Medium 문제On a 2D plane, we place n stones at some integer coordinate points. Each coordinate point may have at most one stone.A stone can be removed if it shares either the same row or the same ..
https://leetcode.com/problems/find-the-closest-palindrome/description/?envType=daily-question&envId=2024-08-24leetcode - Find the Closest Palindrome문제 유형 : 팰린드롬, 회문, 문자열 처리문제 난이도 : Hard 문제Given a string n representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie, return the smaller one.The closest is defined as the absolute difference mi..
https://leetcode.com/problems/strange-printer/description/?envType=daily-question&envId=2024-08-21leetcode - Strange Printer문제 유형 : 문자열 처리, 재귀, 다이나믹 프로그래밍, 투 포인터문제 난이도 : Hard 문제There is a strange printer with the following two special properties:The printer can only print a sequence of the same character each time.At each turn, the printer can print new characters starting from and ending at any..
https://leetcode.com/problems/stone-game-ii/description/?envType=daily-question&envId=2024-08-20leetcode - Stone Game II문제 유형 : 다이나믹 프로그래밍, 부분합문제 난이도 : Medium 문제Alice and Bob continue their games with piles of stones. There are a number of piles arranged in a row, and each pile has a positive integer number of stones piles[i]. The objective of the game is to end with the most stones.Alice and ..
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://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..