Leibniz determinant formula complexity
问题 I wrote some code that calculates the determinant of a given nxn matrix using Leibniz formula for determinants. I am trying to figure out it's complexity in O-notation. I think it should be something like: O(n!) * O(n^2) + O(n) = O(n!*n^2) or O((n+2)!) Reasoning: I think O(n!) is the complexity of permutations. and O(n) the complexity of perm_parity, and O(n^2) is the multiplication of n items each iteration. this is my code: def determinant_leibnitz(self): assert self.dim()[0] == self.dim()