Here's the systematic strategy we'll apply for solving problems:
- State the problem clearly. Identify the input and ouput formats.
- Come up with some example inputs and outputs. Try to cover all edge cases.
- Come up with a correct solution for the problem. State it in plain English.
- Implement the solution and test it using example inputs. Fix bugs, if any.
- Analyze the algorithm's complexity and identify inefficiencies, if any.
- Apply the right technique to overcome the inefficiency. Repeat steps 3 to 6.