DEV Community

Cover image for Picture algorithm with Flowchart
Anwar Sadat Ayub
Anwar Sadat Ayub

Posted on

Picture algorithm with Flowchart

Hi everyone,

A lot of people like myself love to see ideas put to graphics to fully understand it. When listening to someone explaining an idea or problem to you, you try to "picture" what the person is saying in your mind to have clarity.

Most often as a programmer, you would be required to solve a problem. And when doing so, you would write it down and figure out the best solution to the problem. Other interested parties might not be technically inclined to understand the algorithm you wrote down. What is the best alternative, you can represent your algorithm graphically using symbols.

For most part of a program, there would be;

  • Starting point - indicates when the program is executed or opened
  • Input - indicates the data that is required by the program which can be received either from the user or other external sources
  • Process - basically performing some sort of calculations or logic on the input data by the program to get the intended results
  • Decision - to determine if the input data meets a certain condition.
  • Output - indicates the data that will be shown to the user.
  • End point - indicates when the program terminates.

All the above are part of a program that can be represented using graphically using symbols in flowchart illustrated below.

Flowchart symbols

Going back to the algorithm from the previous article Pseudo Code - build program in your own language.,

  • Start the bus 🚌
  • Move from School 🚌🏫
  • Go to Point A 🏠🚌
  • Move from Point A 🚌🏠
  • Go to Point B🏡🚌
  • Move from Point B 🚌🏡
  • Go to Point C 🏘🚌
  • Move from Point C 🚌🏘
  • Go to School 🏫🚌
  • Stop bus engine 🚌

Let's convert the above pseudo code to graphics using flowchart symbols;

Pickup Location Map

So as you can see, it is pretty easy to interpret your pseudo code to flow chart. I admit algorithm can be challenging but if you practice from the basics, you can surely do better.

Hope this series on algorithm basics has help clear some misconceptions. I hope you enjoyed it.

Thank you and see you on the next one 👋.

Top comments (0)