BY:ROMEJANE JOY DADO
Summary
1. Abstract Data Types (ADTs):
Abstract Data Types are a high-level concept used in computer science to describe the behavior and
properties of data structures without specifying the implementation details. They provide a blueprint for
how data can be organized and manipulated. Common abstract data types include:
- Lists: ADTs like lists describe collections of elements with operations like insert, delete, and search.
- Stacks: ADTs that represent a linear collection with operations like push and pop.
- Queues: ADTs that represent a linear collection with operations like enqueue and dequeue.
- Trees: ADTs used to represent hierarchical structures, such as binary trees or AVL trees.
- Graphs: ADTs used to represent networks or relationships between elements.
- Sets and Maps: ADTs that deal with unique elements (sets) or key-value pairs (maps).
2. Algorithm Description:
An algorithm is a step-by-step procedure or a set of well-defined rules for solving a specific problem or
performing a particular task. Algorithm descriptions provide a clear and unambiguous explanation of how
to solve a problem or achieve a goal. These descriptions can be written in natural language, pseudocode, or
programming languages. A good algorithm description includes details about inputs, outputs, and the
sequence of steps needed to transform inputs into desired outputs.
3. Space Complexity vs. Time Complexity:
Space complexity and time complexity are two essential aspects of algorithm analysis.
- Time Complexity: Time complexity measures how the running time of an algorithm increases with the
size of the input data. It helps in understanding how efficiently an algorithm performs in terms of time.
Common notations used to express time complexity include Big O (O), Big Theta (Θ), and Big Omega (Ω).
- Space Complexity: Space complexity measures how the memory or storage requirements of an
algorithm grow as a function of the input size. It helps in understanding how efficiently an algorithm uses
memory. Like time complexity, space complexity is also expressed using Big O notation.
4. Types of Analysis Comparison:
There are several types of analysis used in computer science and algorithm design. Here's a brief
comparison of some of the common types:
- Time Complexity Analysis: Focuses on understanding how the running time of an algorithm scales with
input size. It is crucial for evaluating algorithm efficiency.
- Space Complexity Analysis: Concentrates on understanding how the memory usage of an algorithm
changes with input size. It is essential for optimizing memory resources.