Pattern

1. Understand the problem clearly.

2. First solution

3. Optimal solution