Data Structures Flashcards
Data Structure
Definition: A way of organizing and storing data so that it can be accessed and modified efficiently.
Examples: Arrays, Linked Lists, Stacks, Queues, Trees, Graphs, Hash Tables.
Node
Definition: A basic unit of a data structure, such as a linked list or tree, that contains data and references to other nodes.
Components: Data (value stored), Pointer(s) (reference to the next node or child nodes)
Pointer/Reference
Definition: A variable that holds the memory address of another variable, often used in dynamic data structures like linked lists and trees.
Purpose: To connect nodes or elements within a data structure.
Linear Data Structures
Definition: Data structures where elements are arranged in a sequential manner.
Examples: Arrays, Linked Lists, Stacks, Queues.
Non-Linear Data Structures
Definition: Data structures where elements are arranged in a hierarchical manner and are not in sequence.
Examples: Trees, Graphs.
Dynamic Data Structures
Definition: Data structures that can change in size during runtime, allowing for more flexible memory usage.
Examples: Linked Lists, Trees, Graphs.
Abstract Data Type (ADT)
Definition: A model for data structures that defines the data type independently of its implementation.
Examples: Stack, Queue, List, Set.