A derangement is defined as a permutation of an array such that no element appears in its original position.
Given an integer n representing an array initially containing n distinct elements from n, return the total number of derangements of the array.
Since the answer may be large, return the result modulo
Constraints:
A derangement is defined as a permutation of an array such that no element appears in its original position.
Given an integer n representing an array initially containing n distinct elements from n, return the total number of derangements of the array.
Since the answer may be large, return the result modulo
Constraints: