
How Shuffled is This Sequence?
Given a sequence \$S\$ with length \$n\$ of exactly one each of whole numbers from \$1\$ to \$n\$, your task is to return a number \$\sigma\$ indicating how shuffled it is.
The shuffledness algorithm
Total a 'shuffledness' value for each element \$\sigma_i\$ in s...