| 42 | } |
| 43 | |
| 44 | bool IsPermutationTrivial(std::span<const int64_t> permutation) { |
| 45 | for (size_t i = 1; i < permutation.size(); ++i) { |
| 46 | if (permutation[i - 1] + 1 != permutation[i]) { |
| 47 | return false; |
| 48 | } |
| 49 | } |
| 50 | return true; |
| 51 | } |
| 52 | |
| 53 | Status IsPermutationValid(std::span<const int64_t> permutation) { |
| 54 | const auto size = static_cast<int64_t>(permutation.size()); |
no test coverage detected