Photo by Андрей Сизов on Unsplash
Flowcharts and Algorithm
In This Blog We are Going To Understand Flowcharts And What Is Algorithm
This blog is in continuation of the previous blog, in this blog we will learn about Flowcharts And Algorithm which I have learned from the 6th Video Lecture on the DSA playlist by Kunal Kushwaha
Flowcharts
Algorithm
Flowcharts
The flowchart is the visual representation of our ideas before writing a program in a particular programming language such as C++, C, Java, JavaScript etc
The Benefit of having a flowchart is we can easily modify it if we found an issue/bug because solving an error in a programming language is a more tedious process than solving an error in the Flowchart.
The Flowchart follows certain conventions which are described below and some examples along with it:
Credit for the above image: Kunal Kushwaha
Algorithm
The algorithm is writing your ideas in any particular language such that everyone can understand what you are trying to code in the future.
We generally use pseudocode language which consists of Mathematical symbols and English such that everyone can understand it easily.
The algorithm must have the following properties:
1) Input: Zero or more than one
2) Output: At least One
3) Definite
4) Clear (Every statement should have a clear meaning not ambiguous)
5) Finite In Length
Algorithm for adding two numbers:
Input: a, b
sum = a + b
output: sum
Reference Links: