3 Questions
What is the time complexity of the func1
function in program1.c?
O(n)
What is the time complexity of the func
function in program2.c?
O(n^2)
What is the value of T(6) in the recursive algorithm given random(int n) spends one unit of time?
6
Calculate the time complexity of a given function in a C program. Analyze loops and operations to determine the efficiency of the function.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free