1/30
These flashcards review key concepts and definitions related to data structures, their types, advantages, and applications.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a data structure?
A method used to organize and store data in a computer for efficient access and updates.
Why are data structures important?
They support fast storage and retrieval, make problem-solving systematic, and improve memory usage and execution speed.
What is the difference between data and information?
Data is raw and unorganized facts; information is processed and meaningful data.
Give an example of a primitive data type.
Integer, float, character, or boolean.
What is a linked list?
A data structure where elements are connected using links, allowing efficient insertion and deletion.
What is the purpose of a hash table?
To store data as key-value pairs for very fast searching.
What characterizes static data structures?
They have a fixed size determined at compile time.
What are dynamic data structures?
Structures that can grow or shrink in size during runtime.
What does Big-O notation describe?
It describes how the execution time of an algorithm grows as the input size increases.
What is an example of O(1) complexity?
Accessing an array element.
What does a stack data structure operate on?
Last In, First Out (LIFO) principle.
What is the time complexity of searching in an unsorted array?
O(n) complexity.
What are advantages of using data structures?
They provide efficient data management, optimized memory usage, improved performance, scalability, reusability, and abstraction.
What is an array?
A data structure that stores elements in continuous memory locations and allows fast access via an index.
What describes linear data structures?
Items are arranged in a linear or sequential format.
What is an example of a tree application?
File systems or database indexing.
What type of complexity does a binary search tree typically have?
O(log n) for search, insert, and delete operations.
How do queues operate?
They follow the First In, First Out (FIFO) principle.
What are custom data structures?
Data structures designed to fit specific needs and can be reused across projects.
What benefit does abstraction provide in data structures?
It allows the client to use the data structure without needing implementation details.
What is the execution time of an operation?
The amount of time a program or operation takes to complete.
What factors affect execution time?
Hardware speed, input size, and efficiency of data structure and algorithm.
Why learn data structures in C++?
C++ provides low-level memory control and has a Standard Template Library (STL) for built-in data structures.
Give an example of a non-linear data structure.
Graphs or trees.
How do dynamic arrays optimize memory usage?
They allocate memory dynamically as needed.
What is an example of O(n^2) complexity?
Nested loops.
What is a stack's application?
Undo mechanisms, expression evaluation.
In C++, what is a structure (struct)?
A way to group several related variables into one place.
How can data structures promote reusability?
By providing standard and custom data structures that can be reused in different projects.
What is the complexity of searching in a balanced binary search tree?
O(log n).
What type of data do non-primitive data types store?
Groups of values, derived from primitive data types.