The third part of Computational Thinking is the most important one: How do you design an algorithm?
It all starts with the idea for a new program. The problem is well understood and already broken down into smaller problems. You've already identified a few recurring patterns.
An algorithm helps you to break down a problem into concrete steps for the computer to execute.
Let's say you're tasked with determining if a given email address has the right format. The input parameter is an email address a user has filled into a web form. The algorithm needs to return true
or false
. Does the address include an @
sign? If not, return false
. Does the address include a top-level domain? If not, return false
. And so on.
What are your thoughts on this? How did you learn to design algorithms?
21 Lessons helps Junior Developers to level up their skills step by step via their weekly newsletter. Do you want to get out of Tutorial Hell or you're wondering how you develop the skills to write sophisticated programs yourself? Sign up and receive weekly articles and recommendations right in your mailbox.
Top comments (0)