1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What are the two main categories of data structures?
Simple Data Structures and Compound Data Structures.
What is a simple data structure?
Fundamental, built-in data types such as integers, floats, characters, and booleans.
What are compound data structures?
Complex structures built from combinations of simple data structures like lists, tuples, sets, and dictionaries.
What characterizes linear data structures?
Elements are arranged in a sequential manner.
Give examples of linear data structures.
Arrays, lists, stacks, and queues.
What characterizes non-linear data structures?
Elements are arranged in a hierarchical or interconnected manner.
Give examples of non-linear data structures.
Trees and graphs.
What is a Python list?
A compound, linear data structure in Python that is mutable and can store different data types.
What does it mean that a list is mutable?
Values inside a list can be changed, added, or removed at any time.
How can you access elements in a Python list?
By using indexing (e.g., mylist[0]) and slicing (e.g., mylist[1:3]).
What is a stack?
A linear data structure that follows the Last-In, First-Out (LIFO) principle.
What does the LIFO principle mean in the context of stacks?
The last item added is the first one to be removed.
What is the operation called that adds an item to the top of a stack?
Push.
What is the operation called that removes the most recently added item from the stack?
Pop.