#ifndef __PERM_H__ #define __PERM_H__ /** * perm.h * Declarations for some utilities for fun with permutations. */ // +--------------------+--------------------------------------------- // | Exported Functions | // +--------------------+ /** * Procedure: * ia_is_permutation * Parameters: * a0, an array of integers * a1, an array of integers * size, an integer * Purpose: * Determine if the subarray of the first size elements of a1 is a * permutation of the subarray of the first size elements of a0. * Produces: * is_perm, an integer representing a Boolean value * Preconditions: * a0 contains at least size elements. * a1 contains at least size elements. * Postconditions: * a0 is unmodified * a1 is unmodified */ int ia_is_permutation (int a0[], int a1[], int size); #endif // __PERM_H__