Skip to content

webDudes/way_to_solve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image by freepik

Way to solve

NOTE: This repository does not focus on the most efficient solution of a problem, rather it focuses on how to approach a problem.

Why create this repository?

Many beginners in computer science stumble not because they have difficulty in learning a programming language but rather they dont know how to solve a given problem. This repository is created to provide a guide on how to approach a problem and steps involved in solving a problem.

What is problem solving?

In simple words Problem solving is a process of finding solution of given problem.

Fundamental steps of Problem Solving.

When given a problem, there are two mistakes a beginner programmer make, either he straightly jump into the code without planning how problem should be solved or he get stuck on the blank screen which panic him. Rather When given a problem the programmer should follow the following steps:

Understand the problem.

When someone is given a problem. It can be tempting to straightly dive into the code, but it is better to take a step back and make sure you understand the problem as someone rightly said "Think twice, code once". If at first glance you dont understand the problem, try to restate the problem in your own words. For example you are asked to write a function which implements addition. we can restate this problem into simpler words like "Write a problem which takes two numbers and return their sum".

Divide and conquer.

Divide and conquer is an algorithmic paradigm which simply says break the problem into simple sub-problems, conquer the sub-problems by solving them and then combine the solutions of sub-problems in order to form the solution for original problem.

Write Pseudocode.

Pseudocode is a step-by-step written outline of your code that you can gradually transcribe into the programming language. To learn more about Pseudocode and how to write pseudocode checkout this article by WikiHow

Translate pseudocode into code.

When you have your pseudocode ready, translate it to real code.

Hooray! you just learned how to solve a problem using computer.

About

No description or website provided.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published