/** * is-permutation.h * A procedure for checking permutations. */ /** * Procedure: * is_permutation * Parameters: * a1, an array of ints * a2, an array of ints * size, an integer * Purpose: * Determine if the first size elements of a2 are a permutation of * the first size elements of a1. * Produces: * is_perm, an integer that represents a Boolean * Preconditions: * 0 <= size * size <= length of a1 * size <= length of a2 * Postconditions: * The first size elements of a2 are a permutation of the first size * elements of a2 iff is_perm is true. */ int is_permutation (int a1[], int a2[], int size);