Exercise 4: isPermutation. Works, added comments.