I have worked out these answers prior to asking the question, but I am wondering if anyone could tell if I am calculating these functions right using the Big-O analysis? I have calculated the values of each function by only looking at the dominant term for the Big-O analysis. Here are the functions that I am inquiring about below:
Algorithm A: 23n + 36n2;
Algorithm B: 6 + nlog2(n) + n;
Algorithm C: log2n + 36n2.
Here are my work out answers to them below:
Algorithm A: 3.6 X 10^13
Algorithm B: (1,000,000)log2 (1,000,000)= 19931568.5693
Algorithm C: 36(1,000,000)^2 = 36(1,000,000)^2 = 3.6 X 10^13
Algorithm A: 23n + 36n2;
Algorithm B: 6 + nlog2(n) + n;
Algorithm C: log2n + 36n2.
Here are my work out answers to them below:
Algorithm A: 3.6 X 10^13
Algorithm B: (1,000,000)log2 (1,000,000)= 19931568.5693
Algorithm C: 36(1,000,000)^2 = 36(1,000,000)^2 = 3.6 X 10^13