1
answer
0
watching
111
views
10 Nov 2019
Algorithms Question
Answer question fully for thumbs up.
Question 1 Suppose there are two algorithms that solve the same problem: one algorithm performs 4n2 n+300 basic operations; another algorithm performs 101n - 100 basic operations, where n is the input size, n 21 (a) Which one would you prefer, assuming all other factors are equal? Hint: your choice may depend on the value of n. (b) Explain how the two algorithms can be combined so that the resulting algorithm works fast for all input sizes?
Algorithms Question
Answer question fully for thumbs up.
Question 1 Suppose there are two algorithms that solve the same problem: one algorithm performs 4n2 n+300 basic operations; another algorithm performs 101n - 100 basic operations, where n is the input size, n 21 (a) Which one would you prefer, assuming all other factors are equal? Hint: your choice may depend on the value of n. (b) Explain how the two algorithms can be combined so that the resulting algorithm works fast for all input sizes?
Jarrod RobelLv2
1 Sep 2019