Algo task pattern
Understand the problem.
Explain the problem in your own words.
Inputs.
Limits.
Outputs.
Explore examples.
Simple examples.
More difficult ones.
Corner cases (limits).
Not valid inputs.
Break the problem into steps/comments on what needs to be done.
Keywords. Common patterns.
Important things to cover and investigate.
Steps as comments.
Draft data structures.
Simplify.
Solve simple parts at the start (read input, create output).
Think about the core step to be solved.
Write a simplified solution.
Rethink the problem and add more advanced logic.
Last updated
Was this helpful?