- What are your thoughts about this problem so far?
- Write pseudocode/explain concisely how your algorithm works and intuition (how you came up with the solution).
- (If not optimized) Can we do better?
- What is the running time of the algorithm?
- (Medium - Hard Problem) Are there any other solutions?
Notice how the box move, and the number of boxes in each column after switching the gravity.
Notice that Bob get paid for TV set with negative amount
- Starting with two numbers, what is the number left on the board after 1 step?
- For three numbers, what is the number left on the board after 2 step?
- What is the strategy of the first player?
- What is the strategy of the second player?
- How we define the number left on the board in general case?
- What is our strategy here?
- How do we keep track of the amount of candies we have to stop correctly?
- Thinking about the strategy that Dezider should use.
- Imagine a indexed array. What is the position of each number in sorted array from (1 -> n)?
- What do we need to count here?