Question: help with those you can name them a,b,c,d and e respectively State two limitations of experimental approach to algorithm analysis, as opposed to asymptotic (Big-O)





help with those you can name them a,b,c,d and e respectively
State two limitations of experimental approach to algorithm analysis, as opposed to asymptotic (Big-O) analysis. Determine the time complexity of the following algorithm. Briefly explain your solution and please state any assumptions that you have made. NB: There are two array inputs A and B. int myTest(array A, arrayB) \{ int acc=0 for a in arrayA\{ for b in arrayB \{ if a==b{ acc+=1 \} \} \} \} Sort the following functions in decreasing order of growth following the Big-O notation (NB: There is no need typing the functions, just use the labels (a) to (h) to sort the functions accordingly.) a. logloglog(n) b. n3log(n) c. log(n)+7.5(n) d. 3(n) e. n(4)log(n) f. loglog(n) g. 8.5n+log(n) Determine the output of the following code. (NB: Show your steps to the final answer) public class MyClass \{ public static void main(String args[]){ System.out.println("recursive function = " + func(4)); \} public static int func(int val)\{ if (val==0) return (val+6); else return 8 + func(val-1); \} \} Consider that the processing time of an algorithm of Big-O complexity O(f(n)) is directly proportional to f(n). Suppose we have two such algorithms A and B with time complexity TA(n)=O(n2) and TB(n)=O(nlogn) respectively. During an experiment, each algorithm spends 10 seconds to process 100 data items. How much time will each algorithm spend to process 10, 000 items? (Please show your wokings/steps)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
