Tag: Code Corner

  • Code Corner: Permutation Check

    Code Corner: Permutation Check

    The problem: We are doing a permutation check. Given a list A with n elements and the task is to determine if A is a permutation of natural numbers from 1 to n. For example [4,2,3,1] is a permutation since all element of the list are in the list [1..n] where n=4. [4,1,2] is not…