Professional Documents
Culture Documents
DataStruc Prelim2
DataStruc Prelim2
and ALGORITHMS
Linear Non-Linear
Elements are Elements are
accessed in a stored and
sequential order accessed in a non-
but may be stored sequential order.
unsystematically
Top Down:
- Decompose problem into sub-problems, then
decompose sub-problems
- Structure charts are common design tool
Bottom Up:
- Design a set of tools and use them to build a
solution to the problem
- The tools are the values and operations of ADTs
• The set of
operations that
can be used on
values of that type
• Maximize Cohesion
- Every ADT has single, well-defined
purpose
• Minimize Coupling
- Design classes so that changing one does
not break the other
- Minimize reliance of one class on another
Definition:
Used for storing elements
where each is separate
object
Types:
Singly, double, circular
linked list
Definition:
An ordered list in
which the last element
added is the first
element retrieved or
removed. (LIFO)
Definition:
It is an ordered list in
which the first
element added is the
first element
retrieved or removed
(FIFO)
Course Instructors: Mary Gift D. Dionson, LPT, MSCS
DATA STRUCTURES and ALGORITHMS STI West Negros University
Markh B. Jamandre, MSCS
ADT: Tree
Representation: Operations:
Create, Insert, Search, Traversal
Definition:
Represents a
hierarchical nature
of a structure in a
graphical form
Definition:
A complete binary
tree where the value
of each of each
parent node is either
higher or lower than
the value of its child
Course Instructors: Mary Gift D. Dionson, LPT, MSCS
DATA STRUCTURES and ALGORITHMS STI West Negros University
Markh B. Jamandre, MSCS
ADT: Priority Queue
Representation: Operations:
Insertion, Deletion, Peeking, Extract
Definition:
A special type of
queue where
elements are
processed based
on their order
Operations:
Insertion, Remove, Access, Size
Definition:
A collection of
elements where
each element is
unique
Definition:
Consist of a set of Graph Adjacency Matrix
vertices (or nodes)
and a set of edges
(relations) between
the pairs of vertices
Adjacency List Representation
Course Instructors: Mary Gift D. Dionson, LPT, MSCS
DATA STRUCTURES and ALGORITHMS STI West Negros University
Markh B. Jamandre, MSCS