Data Structures Flashcards
Array
A collection of elements identified by index or key. Arrays have a fixed size and allow constant time access to elements
Linked List
A linear data structure where elements are stored in nodes, each pointing to the next node. Allows dynamic size and efficient insertions/deletions
Stack
A collection of elements that follows the last in, first out principle. Supports operations like push and pop
Queue
A collection of elements that follows the First in, first out principle. Supports operation like enqueue and dequeue
Hash table
A data structure that maps keys to values using a hash function. Provides efficient lookups, insertions, and deletions
Binary tree
A tree data structure where each node has at most two children, referred to as left child and the right child
Graph
A collection of nodes and edges connecting pairs of nodes. Can be directed or undirected