2.3.1 Algorithms - Aaron Flashcards
What is binary search?
A O (log(n)) algorithm to search a sorted list for a particular item by repeatedly halving a sublist which could contain the item.
What is the big O for constant complexity?
O (1)
How is time complexity measured?
Big O notation
What does exponential time complexity mean?
The amount of time to complete an algorithm is proportional to 2 to the power of number of items inputted.
What does logarithmic time complexity mean?
The time taken to complete an algorithm will increase at a smaller rate as the number of elements inputted.
What is an algorithm?
An algorithm is a series of steps that complete a task.
What is the big O of a linear search algorithm?
O (n)
What is the big O of a binary search algorithm?
O(log(n))
What is the big O of a bubble sort algorithm?
O (n2)
What is a logarithm?
How many times a certain number is multiplied together to reach another number.