The document defines an isInertial method that takes an integer array as a parameter and returns 0 or 1. It separates the array elements into odd and even values, finds the maximum value, and returns 1 if all odd values are greater than all even values (except the maximum). It returns test results for several example integer arrays.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
71 views2 pages
Is Inertial
The document defines an isInertial method that takes an integer array as a parameter and returns 0 or 1. It separates the array elements into odd and even values, finds the maximum value, and returns 1 if all odd values are greater than all even values (except the maximum). It returns test results for several example integer arrays.