Codility Permutation Check Problem

y4YOuMK

 

Test Results: https://codility.com/demo/results/demoGUYV27-KM2/