Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Introduction to Data Structure and Algorithms

Rating
-
Sold
-
Pages
25
Uploaded on
05-06-2024
Written in
2023/2024

Data Structures and Algorithms (DSA) form the backbone of computer science, enabling efficient data organization and problem-solving. Data structures, such as arrays, linked lists, stacks, and trees, provide systematic ways to manage and store data, ensuring quick access and modification. Algorithms, the step-by-step procedures for computations, optimize tasks like searching, sorting, and graph traversal. Mastery of DSA is crucial for software development, enhancing performance and scalability. Understanding DSA principles not only aids in coding interviews and competitive programming but also underpins the development of robust, high-performing applications in the real world.

Show more Read less
Institution
Course

Content preview

Algorithm & Flowchart Manual




ALGORITHM & FLOWCHART
MANUAL for
STUDENTS


Algorithm & Flowchart Manual



ALGORITHM:

The word “algorithm” relates to the name of the mathematician Al-khowarizmi, which means
a procedure or a technique. Software Engineer commonly uses an algorithm for planning
and solving the problems. An algorithm is a sequence of steps to solve a particular problem
or algorithm is an ordered set of unambiguous steps that produces a result and terminates in
a finite time

Algorithm has the following characteristics

• Input: An algorithm may or may not require input

• Output: Each algorithm is expected to produce at least one result

• Definiteness: Each instruction must be clear and unambiguous.

• Finiteness: If the instructions of an algorithm are executed, the algorithm
should terminate after finite number of steps



The algorithm and flowchart include following three types of control structures.

1. Sequence: In the sequence structure, statements are placed one after the other and
the execution takes place starting from up to down.
2. Branching (Selection): In branch control, there is a condition and according to a
condition, a decision of either TRUE or FALSE is achieved. In the case of TRUE, one
of the two branches is explored; but in the case of FALSE condition, the other
alternative is taken. Generally, the ‘IF-THEN’ is used to represent branch control.
3. Loop (Repetition): The Loop or Repetition allows a statement(s) to be executed
repeatedly based on certain loop condition e.g. WHILE, FOR loops.

,Advantages of algorithm

• It is a step-wise representation of a solution to a given problem, which makes it easy
to understand.
• An algorithm uses a definite procedure.
• It is not dependent on any programming language, so it is easy to understand for
anyone even without programming knowledge.
• Every step in an algorithm has its own logical sequence so it is easy to debug.




2
Algorithm & Flowchart Manual


HOW TO WRITE ALGORITHMS

Step 1 Define your algorithms input: Many algorithms take in data to be processed, e.g.
to calculate the area of rectangle input may be the rectangle height and rectangle width.

Step 2 Define the variables: Algorithm's variables allow you to use it for more than one
place. We can define two variables for rectangle height and rectangle width as HEIGHT and
WIDTH (or H & W). We should use meaningful variable name e.g. instead of using H & W
use HEIGHT and WIDTH as variable name.

Step 3 Outline the algorithm's operations: Use input variable for computation purpose, e.g.
to find area of rectangle multiply the HEIGHT and WIDTH variable and store the value in new
variable (say) AREA. An algorithm's operations can take the form of multiple steps and even
branch, depending on the value of the input variables.

Step 4 Output the results of your algorithm's operations: In case of area of rectangle
output will be the value stored in variable AREA. if the input variables described a rectangle
with a HEIGHT of 2 and a WIDTH of 3, the algorithm would output the value of 6.




FLOWCHART:

The first design of flowchart goes back to 1945 which was designed by John Von Neumann.
Unlike an algorithm, Flowchart uses different symbols to design a solution to a problem. It is
another commonly used programming tool. By looking at a Flowchart one can understand
the operations and sequence of operations performed in a system. Flowchart is often
considered as a blueprint of a design used for solving a specific problem.

Advantages of flowchart:

, • Flowchart is an excellent way of communicating the logic of a program. •
Easy and efficient to analyze problem using flowchart.
• During program development cycle, the flowchart plays the role of a blueprint, which
makes program development process easier.
• After successful development of a program, it needs continuous timely maintenance
during the course of its operation. The flowchart makes program or system
maintenance easier.
• It is easy to convert the flowchart into any programming language code.




3
Algorithm & Flowchart Manual


Flowchart is diagrammatic /Graphical representation of sequence of steps to solve a
problem. To draw a flowchart following standard symbols are use
Symbol Name Symbol function

Oval Used to represent start
and end of flowchart



Parallelogram Used for input and
output operation


Rectangle Processing: Used for
arithmetic operations
and
data-manipulations

Diamond Decision making. Used
to represent the
operation in which there
are two/three
alternatives, true and
false
etc

Arrows Flow line Used to
indicate the flow of
logic by
connecting symbols

Circle Page Connector

Written for

Institution
Course

Document information

Uploaded on
June 5, 2024
Number of pages
25
Written in
2023/2024
Type
Class notes
Professor(s)
Dr. sandip
Contains
All classes

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
debsnigdha18

Get to know the seller

Seller avatar
debsnigdha18 Vellore Institute of Technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions