Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.11 KB

File metadata and controls

29 lines (24 loc) · 1.11 KB

Questions

  1. What are your thoughts about this problem so far?
  2. Write pseudocode/explain concisely how your algorithm works and intuition (how you came up with the solution).
  3. (If not optimized) Can we do better?
  4. What is the running time of the algorithm?
  5. (Medium - Hard Problem) Are there any other solutions?

Hints

Gravity Flip

Notice how the box move, and the number of boxes in each column after switching the gravity.

Sale

Notice that Bob get paid for TV set with negative amount

Game

  • 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?

Twins

  • What is our strategy here?
  • How do we keep track of the amount of candies we have to stop correctly?

DVDs

  • 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?