R, 27 bytes
any(rank(x<-scan(),,'f')-x)
Returns FALSE for Truthy, TRUE for FALSY (just to shave one byte)
Explanation:
If the array containing the rank of each value is equal to the input array, then it's a permutation of 1..n
Note:
5 bytes are wasted because in rank function the default handling strategy in case of ties is "average their ranks" instead of any of the other possibilities... argh!
digEmAll
- 5.1k
- 15
- 22