목록우선순위큐 (20)
넘치게 채우기
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/ipo/description/leetcode - IPO문제 유형 : 우선순위 큐, 정렬문제 난이도 : Hard 문제Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects to increase its capital before the IPO. Since it has limited resources, it can only finish at most k distinct projects before the IPO. Help LeetCode desi..
https://leetcode.com/problems/hand-of-straights/description/leetcode - Hand of Straights문제 유형 : 우선순위 큐, 그리디, 해시문제 난이도 : Medium 문제Alice has some number of cards and she wants to rearrange the cards into groups so that each group is of size groupSize, and consists of groupSize consecutive cards.Given an integer array hand where hand[i] is the value written on the ith card and an integer groupSize,..
https://leetcode.com/problems/find-the-safest-path-in-a-grid/description/leetcode - Find the Safest Path in a Grid문제 유형 : bfs, 우선순위 큐, 다익스트라, 최단거리문제 난이도 : Medium 문제You are given a 0-indexed 2D matrix grid of size n x n, where (r, c) represents:A cell containing a thief if grid[r][c] = 1An empty cell if grid[r][c] = 0You are initially positioned at cell (0, 0). In one move, you can move to any ad..
https://leetcode.com/problems/minimum-cost-to-hire-k-workers/description/leetcode - Minimum Cost to Hire K Workers문제 유형 : 우선순위 큐, 정렬문제 난이도 : Hard 문제There are n workers. You are given two integer arrays quality and wage where quality[i] is the quality of the ith worker and wage[i] is the minimum wage expectation for the ith worker.We want to hire exactly k workers to form a paid group. To hire a ..
https://leetcode.com/problems/relative-ranks/description/leetcode - Relative Ranks문제 유형 : 우선순위 큐문제 난이도 : Easy 문제You are given an integer array score of size n, where score[i] is the score of the ith athlete in a competition. All the scores are guaranteed to be unique.The athletes are placed based on their scores, where the 1st place athlete has the highest score, the 2nd place athlete has the 2n..
https://leetcode.com/problems/meeting-rooms-iii/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Leetcode - Meeting Rooms III 문제 유형 : 우선순위 큐 문제 난이도 : Hard 문제 You are given an integer n. There are n rooms numbered from 0 to ..
https://leetcode.com/problems/furthest-building-you-can-reach/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Leetcode - Furthest Building You Can Reach 문제 유형 : 우선순위 큐, 그리디 문제 난이도 : Medium 문제 You are given an i..
https://leetcode.com/problems/least-number-of-unique-integers-after-k-removals/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Leetcode - Least Number of Unique Integers after K Removals 문제 유형 : 그리디, 해시, 정렬, 우선..
https://leetcode.com/problems/sort-characters-by-frequency/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Leetcode - Sort Characters By Frequency 문제 유형 : 문자열 처리, 해시, 정렬, 우선순위 큐 문제 난이도 : Medium 문제 Given a strin..