Data Types Flashcards
List
Ordered, possible nested, mutable sequence of elements
Tuple
Ordered immutable sequence of elements
Dictionary
An unordered collection of key-value pairs
Set
Unordered collection of elements
Time complexity of various functions on a list
Time complexity of various function on a tuple
Append O(1)
Time complexity of various function on dictionaries and sets
How do dictionaries or sets achieve O(1) for both element addition and look up
Using a hash table
Hash maps keys to an integer
What is a series? How to make
One dimensional array of homogeneous data
How to create a vector in Python
List
Or
np.array()
Time complexity of various function on a Stack
When to use a Tree
To represent hierarchical relationships among data