Permutations parity in linear time (O(n))
Matrix operations time complexity improved