Observe the following function and try to determine the time complexity for the
ID: 3691467 • Letter: O
Question
Observe the following function and try to determine the time complexity for the alternative conditions provided.
Pick from the following possible letters available here to answer your question
a. O(1)
b. (n3)
c. O(n)
d. (1)
e. (n)
f. (n3)
g. O(n2)
h. (n)
1. Pick suitable complexity values for foo, given the following information:
Function1( ) has the complexity of O(n)
Function2( ) has the complexity of (1)
Function3( ) has the complexity of (1)
Where y is always constant 7 and x is equal to n
2. Pick suitable complexity values for foo, given the following information:
Function1( ) has the complexity of O(n)
Function2( ) has the complexity of (n)
Function3( ) has the complexity of O(n)
Where y is equal to n and x is equal to n
3. Pick suitable complexity values for foo, given the following information:
Function1( ) has the complexity of O(n2)
Function2( ) has the complexity of (1)
Function3( ) has the complexity O(1)
Where y is equal to n and x is equal to 6
4. pick time complexity for foo given the the following information about the rate of growth for the following functions;
Function1( ) has a time complexity of (1)
Function2( ) has a time complexity of O(1)
Function3( ) has a time complexity of (1)
Where y is always constant 200 and x is always a constant 1 million
5. Pick suitable complexity values for foo, given the following information:
Function1( ) has the complexity of O(n)
Function2( ) has the complexity of (1)
Function3( ) has the complexity O(1)
Where y is equal to n and x is equal to 1
Explanation / Answer
1. (n)
2. (n3)
3. O(n2)
4. (1)
5. (n)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.