Looks like no one added any tags here yet for you.
Why Data Structure Matters
serves as an architectural blueprint
dictates how data is organized and accessed by the elegance of the software system
Data Structure
A systematic way of organizing and storing data in a computer so it can be efficiently accessed and modified
arranging data in a computer
like a container or a format that enables us to work with data effectively
fundamental building blocks
Classifications of Data Structure
Primitive and Non-primitive Data
Linear and Non-linear Data
Primitive Data Structure
fundamental type of data structure
store one data or single type of data
EXAMPLES: integer, float, character, and pointer
Non-primitive Data Structure
type of data structure that the user can define that store on a different type in a single entity
EXAMPLE: arrays, lists, and files
Linear Data Structure
static and dynamic
a type of data structure that is sequential
all data or element are stored in a sequential manner
EXAMPLES: array, list, stack, and queue
Non-linear Data Structure
form of data structure that doesn’t stay arranged sequentially
doesn’t involve a single level
not easy to implement
utilization of computer memory is efficient
EXAMPLES: graph and tree
Basic Data Type (or Primitive Data Structures)
represents a set of individual data and is frequently used to create a program
also called atomic data structure because it represent a data where it can no longer be divided
can store a single value in a variable
divided into two: Simple Type and Pointer Type
Simple Type
declared according to syntax rule of programming language
stores value that the users input
Example declaration:
DataType VariableName = value;
Pointer Type
can hold or store memory address of another variable
when declaring, it has to specify the data type it points to
Structure Type (or Simple Data Structure)
a data structure that contains a basic data type or any of the defined data types as its elements
useful if we want to organize a collection of data but does not want to manage the data separately
EXAMPLES: arrays, strings, and records
Trees (Non-primitive - Non-linear)
hierarchical data structure with root nodes and branches leading to various child nodes
used for task-like organizing data
Graphs (Non-primitive - Non-linear)
used to represent connection between objects
consist of edge and vertices
crucial for modelling complex relationships
Hash Table (Non-primitive - Non-linear)
uses hash function to map keys allowing for the rapid data retrieval
often used in databases and implementing data dictionary
Benefits of Data Structures
efficiency of the program
exhibits time complexity
reusable
data storage
access the data anytime
Disadvantages of Data Structure
complex
time
cumbersome (complex)
Traversing (Data Structure Operations)
accessing or visiting each storage location where the data is stored
Searching (Data Structure Operations)
finding the location/s of data that satisfies one or more conditions
Inserting (Data Structure Operations)
adding new data into the data structure
Deleting (Data Structure Operations)
removing existing data from the data structure
Sorting (Data Structure Operations)
arranging the data in a specified order, either ascending or descending
Merging (Data Structure Operations)
combining the data from two data structures
Searching for Min/Max
finding the minimum or maximum element in the data structure
often used in priority queues or finding extreme values in datasets