Count Permutations with Max Gap Constraint | FE Prep