If the number of steps required to solve a problem is O(n$^{k}$), then the problem is said to be solved in:

If the number of steps required to solve a problem is O(n$^{k}$), then the problem is said to be solved in:
A. non-polynomial time
B. polynomial time
C. infinite time
D. none of the mentioned
 
Answer: B
Explanation: Most of the operations like addition, subtraction, etc as well as computing functions including powers, square roots and logarithms can be performed in polynomial time. In the given question, n is the complexity of the input and k is some non negative integer.
 

Tìm kiếm

Back
Top