What 2 pieces of informations allow you to analyse an algorithm?
What is meant by the time complexity of an algorithm?
the amount of time required to solve a particular problem
What is the notation for time complexity?
big-O-notation
What does big-O notation show?
the effectiveness of an algorithm
What is big-O notation good for?
predicting the amount of time taken to solve an algorithm given the number of items input
What does a linear time complexity mean?
the amount of time taken to complete an algorithm algorithm is directly proportional to the number of items input
What does a constant time complexity mean?
the amount of time taken to complete an algorithm is independent of the number of items input
What does a polynomial time complexity mean?
the amount of time taken to complete an algorithm is proportional to the number of items input, to the power of n
What does an exponential time complexity mean?
the amount of time taken to complete an algorithm is proportional to 2 to the power of the number of items input
What does a logarithmic time complexity mean?
the amount of time taken to complete an algorithm will increase at a smaller rate as the number of items input increases
What is a logarithm?
how many times a certain number (base) is multiplied by itself to reach another number
What is space complexity?
the amount of storage an algorithm takes up
What is an algorithm?
a series of steps that complete a task
How do you reduce the space complexity?
complete all operations on a single data set
How do you reduce the time complexity of an algorithm? (2 steps)
What is the big-O notation of a linear search algorithm?
O(n)
What is the big-O notation of binary search algorithm?
O(log(n))
What is the big-O notation of a bubble sort algorithm?
O(n2)