An Interest In:
Web News this Week
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
November 26, 2022 10:41 pm GMT
Original Link: https://dev.to/mahmoudsayed/top-10-tips-for-problem-solving-5197
top 10 tips for problem-solving
solving the problem
1- Understand the problem
- Describe the problem for me on the paper so I can understand it
2- Explore concrete examples
- Understand the inputs and the outputs expected to out
- How to handle errors
- What happens when the user enters something invalid
3- Break it down
- break the problem into small parts and steps in the code place - - to solve the problem as steps to follow
4- solve the problem in a simple way
- Write the solution to the problem as simply as possible
Refactoring the solution
5- Check the results
- Make sure the output of your solution required one as output from your code
6- Refactor the code for a better version
- Go through the solution steps and check if we can write it in a better way
- Search if there is a helper function that can make the code run faster for time complexity
7- Reuse my code
- think if I can use some parts of my code as solutions for other problem
8- work on time and space complexity
- Work on making the code run faster than it exists
- Work on making the code not consume much memory space
9- Search on google to find other solutions to learn from them
10- Share your solution
- upload your solution on GitHub and share it with others
- explain it so you will learn as much as you teach
Follow Me On LinkedIN
Original Link: https://dev.to/mahmoudsayed/top-10-tips-for-problem-solving-5197
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To