In computational complexity theory, a complexity class is a set of problems of related complexity. A typical complexity class has a definition of the form:
the set of problems that can be solved by abstract machine M using O(f(n)) of resource R (n is the size of the input)
Complexity theory is part of the theory of computation dealing with the resources required during computation to solve a given problem.
The time complexity of a problem is the number of steps that it takes to solve an instance of the problem as a function of the size of the input (usually measured in bits), using the most efficient algorithm.