fixed length, can hold any type, accessed via indices
Do insertion sort on the board for the following data: [19,4,2,17,9,6,15,1,0,13,7]
[0,1,2,4,7,9, 13, 15, 19]
What are 2 ways to resolve collisions?
What is the best, average and worst case of quick sort
O(nlogn), O(nlogn) O(n^2)
What does the data look like in the best and worst case of insertion sort.
Which function adds to the end of a list. which function removes from a list.
.append(), .remove()
What is this called: A function that performs a comparison between two values a and b
comparator
Hash functions never have collisions : True or false
False
Why?
What are the time complexties of the fplowing list functions: append, remove, concatenation, extend
O(c), O(n) for the rest
dictionaries and sets
What does the : operator do, and what is it called.
Do merge sort on the following data: [6,2,18,3,9,7,11,2,5,10]
Idk I’ll check the board.
Name 2 properties of a set
unique elements and unordered
What is the best, worse, and average case of insertion sort
O(n), O(n^2)
What is the time complexity of inserting into a dictionary and set.
O(c)
Which function can append a list onto another list
Extend (+=)
Do quick sort on the following data : [8,4,2,10,11,5,6,7]
ill check the work on the board
name 2 properities of a dictionary
key value pairs, unique keys
What is the best, average and worst case of merge sort
O(nlogn)
whether you have any finals conflicts
Which type of value has this functionality: When the elements inside the list are changed in a function, the changes are permanent and persist after the function returns
reference types
Sorted() and sort() use which type of sorting algorithm.
Timsort
name the set operations and what they do.
Union, Intersection, difference
What affects the time complexities of quick sort?
where the pivot lies in the data
What types should keys in a dictionary be?
ANY TYPE !!