Using Big-O analysis, the value of each function are:
- Algorithm A: O(n^2)
- Algorithm B: O(n*log(n))
- Algorithm C: O(n^2).
Algorithm A:
Speed function: 23n + 36n^2
Using Big-O notation, we focus on the dominant term, which is 36n^2.
So, the Big-O notation for Algorithm A is O(n^2).
Algorithm B:
Speed function: 6 + n*log2(n) + n
Using Big-O notation, we focus on the dominant term, which is n*log2(n).
So, the Big-O notation for Algorithm B is O(n*log(n)).
Algorithm C:
Speed function: log2(n) + 36n^2
Using Big-O notation, we focus on the dominant term, which is 36n^2.
So, the Big-O notation for Algorithm C is O(n^2).