-
https://leetcode.com/problems/maximum-number-of-coins-you-can-get/
There are 3n piles of coins of varying size, you and your friends will take piles of coins as follows:
- In each step, you will choose any 3 piles of coins (not necessarily consecutive).
- Of your choice, Alice will pick the pile with the maximum number of coins.
- You will pick the next pile with maximum number of coins.
- Your friend Bob will pick the last pile.
- Repeat until there are no more piles of coins.
Given an array of integers piles where piles[i] is the number of coins in the ith pile.
Return the maximum number of coins which you can have.
문제 푸는데 걸린 시간 : 20분 문제 이해를 잘못해서 헛수고했다 10분이나 ㅡㅡ;;
'2020년 > 코테' 카테고리의 다른 글
[코테연습] Combination Sum III (0) 2020.09.14 [코테 연습] Compare Version Numbers (0) 2020.09.13 [코테 연습] Largest Perimeter Triangle (0) 2020.09.09 [코테 연습] Relative Sort Array (0) 2020.09.09 [코테 연습] Sum of Root To Leaf Binary Numbers (0) 2020.09.09