Problem Solving Approach
Example: Write a function which takes two numbers and return their sum.
- Can I restate the problem in my own?
- What are the inputs that go into the problem?
- What are the outputs that should come from the solution to the problem?
- Can the outputs be determined from the inputs? do i have enough information to solve the problem ?
- How should I label the important pieces of data that are the part of the problem?
Step1 : Understand The Problem Step2: Explore Concrete Examples Step3: Break it Down Step4: Solve it Or Simplify Step5: Look Back And Refactor
節錄自 https://www.udemy.com/course/js-algorithms-and-data-structures-masterclass/learn/lecture/9816152