We have given an empty array of size n , we need to fill it with natural numbers (we are allowed to repeat). The condition that must follow is the mex of the array must be greater than all the elements we fill in the array . Can someone pls help me with the number of ways to do so ? (Different arrangements of same set of numbers are also considered distinct)
PS:- by mex of a sequence I mean the smallest non negative number that doesn't occur in the sequence