Play with Chips(LeetCode 1217):

Problem