0% found this document useful (0 votes)
33 views7 pages

CC104 - Lessons

This document defines key concepts in data structures and algorithms. It discusses that data structures organize data in linear and non-linear formats. Algorithms are step-by-step instructions to solve problems with defined inputs/outputs. Common data structures include stacks, queues, linked lists, trees, and graphs. Algorithm design paradigms break large problems into smaller pieces.

Uploaded by

Jason Lumawag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views7 pages

CC104 - Lessons

This document defines key concepts in data structures and algorithms. It discusses that data structures organize data in linear and non-linear formats. Algorithms are step-by-step instructions to solve problems with defined inputs/outputs. Common data structures include stacks, queues, linked lists, trees, and graphs. Algorithm design paradigms break large problems into smaller pieces.

Uploaded by

Jason Lumawag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Data Structures and

Algorithms
Prepared By
Engr. Regine Jesa J. Palara, MIT
Fundamentals of Data Structures and
Algorithms
❖ Data Structure – is a special format for storing and organizing data.
❖ Two(2) types of Data Structure:
• Linear – Elements are accessed in a sequential order but may
be stored unsystematically.
• Non-Linear – Elements are stored and accessed in a non-
sequential order.
❖ Abstract Data Type (ADT) – is a logical description of how data is
viewed as well as the operations that are allowed without regard to
how they will be implemented.
❖ Two(2) parts of ADT:
❖ Public or External – the data and the operations.
❖ Private or Internal – the representation and the implementation.
DATA STRUCTURE

Linear Data Non-Linear Data


Structure Structure

Stack Queue Linked-List Array Graphs Trees


Fundamentals of Data Structures and
Algorithms
❖ Abstract Data Types:
❖ Stack – an ordered list in which the last element added is the first
element retrieved or removed. Sometimes it is called (Last-In,
First-Out)
❖ Queue - an ordered list in which the first element added is the
first element retrieved or removed. Sometimes it is called (First-
In, First-Out)
❖ Priority Queue – a special type of queue where elements are
processed based on their order (natural or custom).
❖ Linked List – used for storing elements where each is a separate
object.
Fundamentals of Data Structures and
Algorithms
❖ Abstract Data Types:
❖ Tree – represents a hierarchical nature of a structure in a
graphical form.
❖ Heap – a complete binary tree where the value of each parent
node is either higher or lower than the value of its child nodes.
❖ Set – a collection of elements where each element is unique.
❖ Map – a set of ordered pairs where elements are known as keys
(identifiers) and values (content).
❖ Graph – consists of a set of vertices (or nodes) and a set of edges
(relations) between the pairs of vertices.
Note: The four(4) main operations that could be defined for each ADT are
Initializing, adding, accessing, and removing of data.
Fundamentals of Data Structures and
Algorithms
❖ Algorithm – is a step-by-step of instructions to be executed in
sequence for solving a problem.
❖ Five(5) Characteristics of an Algorithm:
❖ Finiteness: An algorithm must terminate after a specified number
of steps.
❖ Definiteness: Each instruction has to be clear and unambiguous.
❖ Input: An algorithm should have zero or more well-defined data
given before the algorithm begins.
❖ Output: An algorithm must have one (1) or more results, with
specified relation to the input.
❖ Uniqueness: The result of each step depends on the input and/or
the result of the previous step.
Fundamentals of Data Structures and
Algorithms
❖ Elements of an Algorithm:
❖ Sequential operations
❖ Actions based on the state of a data structure
❖ Iteration – repeating an action multiple times.
❖ Recursion – occurs when a function calls itself once or multiple times
to solve a problem.
❖ Algorithm design paradigms:
❖ Divide and Conquer: A problem is broken into smaller subproblems.
❖ Greedy Algorithms: The optimal approach is always chosen in solving
a problem.
❖ Dynamic Programming: Similar to Divide and Conquer except that the
results of the subproblems are reused for overlapping subproblems.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy