목록그리디 (88)
넘치게 채우기
https://leetcode.com/problems/minimum-common-value/description/ Leetcode - Minimum Common Value 문제 유형 : 그리디, 투포인터 문제 난이도 : Easy 문제 Given two integer arrays nums1 and nums2, sorted in non-decreasing order, return the minimum integer common to both arrays. If there is no common integer amongst nums1 and nums2, return -1. Note that an integer is said to be common to nums1 and nums2 if both arrays h..
https://leetcode.com/problems/count-elements-with-maximum-frequency/description/ Leetcode - Count Elements With Maximum Frequency 문제 유형 : 해시, 그리디 문제 난이도 : Easy 문제 You are given an array nums consisting of positive integers. Return the total frequencies of elements in nums such that those elements all have the maximum frequency. The frequency of an element is the number of occurrences of that ele..
https://leetcode.com/problems/bag-of-tokens/description/ Leetcode - Bag of Tokens 문제 유형 : 그리디, 투포인터, 정렬 문제 난이도 : Medium 문제 You start with an initial power of power, an initial score of 0, and a bag of tokens given as an integer array tokens, where each tokens[i] donates the value of tokeni. Your goal is to maximize the total score by strategically playing these tokens. In one move, you can play ..
https://leetcode.com/problems/maximum-odd-binary-number/description/ Maximum Odd Binary Number - LeetCode Can you solve this real interview question? Maximum Odd Binary Number - 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 - Maximum Odd Binary Number 문제 유형 : 문자열처리, 비트마스킹, 그리디 문제..
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/find-polygon-with-the-largest-perimeter/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 - Find Polygon With the Largest Perimeter 문제 유형 : 그리디, 정렬 문제 난이도 : Medium 문제 You ar..
https://leetcode.com/problems/minimum-number-of-operations-to-make-array-empty/description/ Minimum Number of Operations to Make Array Empty - LeetCode Can you solve this real interview question? Minimum Number of Operations to Make Array Empty - You are given a 0-indexed array nums consisting of positive integers. There are two types of operations that you can apply on the array any number of t..
https://leetcode.com/problems/assign-cookies/description/ Assign Cookies - LeetCode Can you solve this real interview question? Assign Cookies - Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor g[i], which is the minimum size o leetcode.com leetcode - Assign Cookies 문제 유형 : 그리디, 정렬 문제..
https://school.programmers.co.kr/learn/courses/30/lessons/148653 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 프로그래머스 - 마법의 엘리베이터 문제 유형 : 그리디 / 수학 문제 난이도 : Level 2 문제 설명 마법의 세계에 사는 민수는 아주 높은 탑에 살고 있습니다. 탑이 너무 높아서 걸어 다니기 힘든 민수는 마법의 엘리베이터를 만들었습니다. 마법의 엘리베이터의 버튼은 특별합니다. 마법의 엘리베이터에는 -1, +1, -10, +10, -100, +100 등과 같이 절댓값이 10c (c ≥ 0 인 ..
https://school.programmers.co.kr/learn/courses/30/lessons/42862?language=cpp 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문제 유형 : 그리디 문제 난이도 : Level 1 문제 설명 점심시간에 도둑이 들어, 일부 학생이 체육복을 도난당했습니다. 다행히 여벌 체육복이 있는 학생이 이들에게 체육복을 빌려주려 합니다. 학생들의 번호는 체격 순으로 매겨져 있어, 바로 앞번호의 학생이나 바로 뒷번호의 학생에게만 체육복을 빌려줄 수 있습니다. 예를 들어, 4번 학생은 3번 학생이나 5번 학생에게만 체육..