
1561. Maximum Number of Coins You Can Get
·
Algorithm
Maximum Number of Coins You Can Get - LeetCode 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 3의 배 수개의 코인이 들어있는 list가 주어진다. 임의의 코인 3개씩을 집어서 자신은 2번째로 큰 코인만을 가져간다고 할 때, 획득할 수 있는 코인의 최대 합을 반환하는 문제다. 1. Greedy from typing import * from collections import deque class Solution: def maxCoins(self..