What is a data structure?
A data structure organizes and stores data so programs can use it efficiently. Its design makes some operations easier and others more expensive.
Study 05 — Data Structures with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is a data structure?
A data structure organizes and stores data so programs can use it efficiently. Its design makes some operations easier and others more expensive.
Why is array indexing typically O(1)?
Arrays provide typically O(1) indexed access because an element’s address can be calculated from the array’s starting address and its index.
Why can middle updates be costly in arrays?
Inserting or deleting near an array’s beginning or middle may require shifting many elements, making the operation O(n).
How does a linked list store its elements?
A linked list stores values in separate nodes connected by references. Its nodes do not need to occupy adjacent memory locations.
What removal rule does a stack follow?
A stack removes the most recently inserted item first: it follows last in, first out (LIFO).
What removal rule does a queue follow?
A queue removes the earliest inserted item first: it follows first in, first out (FIFO).
How does a tree differ from a general graph?
A tree is connected and contains no cycles, whereas a general graph may contain cycles and need not have a single hierarchical root.
What ordering rule defines a binary search tree?
In a binary search tree, values in the left subtree are smaller than the node’s value and values in the right subtree are larger, assuming unique keys.
How does a hash table locate a value?
A hash table uses a hash function to transform a key into an array index, allowing average-case O(1) key lookup with a suitable table and hash function.
What is a hash-table collision?
A collision occurs when different keys produce the same hash-table index. Chaining and open addressing are two ways to handle collisions.
What are the costs of an adjacency matrix?
An adjacency matrix uses a two-dimensional array; edge lookup is O(1), but the representation uses O(V²) space.
When is an adjacency list useful?
An adjacency list stores each vertex’s neighboring vertices. It uses O(V + E) space and is efficient for traversing neighbors in sparse graphs.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
A 14-question quiz on trees, binary trees, traversals, recursive algorithms, and binary search trees. The questions progress from foundational concepts to applied reasoning about structure, complexity, and BST operations.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
Learn how to choose, structure, document, and maintain software documentation for users, developers, integrators, and operators.
A structured guide to comparison-based sorting algorithms, their complexity, stability, memory use, and practical selection criteria.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.