Application of Data Structures Flashcards
Structure of Data:
refers to the relationships among data elements
Logical structure
Structure of Data:
pertains to how data is stored in computer memory
Physical Structure
is described as a set of data elements with certain logical relationships, stored in computer memory with corresponding operations encapsulated
data structure
Basic Principles in data structure design
Problem Analysis
Preliminary Design
Attention to Extensibility
Consideration of time and space cost of algorithm
these structures include linear tables, stacks, and queues
Linear structures
these structures encompass trees, sets, and graphs
Nonlinear structures
A one-to-one relationship exists in the data elements of this structure
Linear structure
is described as a finite sequence of instructions, representing specific and limited operation steps taken to solve a particular problem.
algorithm
common storage
structures of different types of data structures
- sequential storage structure
- chain storage structure
- hash storage structure
- index storage structure
two traversal modes in graph
depth-first traversal
breadth-first traversal
Data elements stored one after another in contiguous memory
Sequential Storage Structure
Data elements linked via pointers, allowing dynamic allocation
Chain Storage Structure
Data elements stored based on hashed keys in a hash table
Hash Storage Structure
Maintains an index mapping keys to data element positions
Index Storage Structure
Traversal Modes:
It involves exploring a graph or tree by first visiting the starting node and then recursively visiting its adjacent nodes (children or neighbors) in depth, prioritizing exploration of deeper nodes before backtracking
Depth-First Traversal