Question: (Big-O Analysis) Total number of comparisons in algorithm A is 2n +n + 1 and total number of comparisons in algorithm B is 2nlog(n) +8n,
(Big-O Analysis) Total number of comparisons in algorithm A is 2n +n + 1 and total number of comparisons in algorithm B is 2nlog(n) +8n, where 'n' is input size. (The base of log is 2). Order of algorithm A is O (a)). Order of algorithm B is OC (b)). What is (a) and (b)? (a): n. (b): nlog(n) o(a): n2 + n. (b): logen (a): n. (b): nlogin (a): n. (b): n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
