Problem Solving in Computer Science
Definition
Problem solving is the process of analyzing a situation and behaving accordingly to generate a response.
Simple Problem Solving Process (4 steps)
- Define and analyze a problem: Identify what the problem is and why it's happening.
- Design a plan: Determine the algorithm or approach to solve the problem.
- Implement the plan: Code the solution using a programming language.
- Evaluate: Assess if the plan worked as intended.
Complex Problem Solving Process (6 steps)
- Define and analyze a problem
- Decompose the problem: Break it down into manageable sub-problems.
- Identify potential plans for each sub-problem: Develop multiple approaches (e.g., plan A, plan B, plan C).
- Select and design the best plan
- Implement that plan
- Evaluate
Important Considerations
- Before taking action, thoroughly investigate the problem to capture all relevant aspects.
- Properly define and analyze the problem.
- When defining a problem, ensure clarity and specify the objectives.