Big O(n!), you will never find being used in coding. It is the most expensive time complexity. Here is an example that weighs O(n!)
class Abc:
@classmethod
def forloop(cls, a, b, endrange, d):
for c in range(0,endrange):
print("{} {} {}".format(a, b, c))
d += 1
print(d)
return d
xyz = Abc()
d = 0
endrange = 5
for a in range(0,endrange):
for b in range(0,endrange):
e = xyz.forloop(a, b, endrange, d)
d = e
Comments
Post a Comment