int minCostToMoveChips(int* position, int positionSize){ int i,oddNum=0,evenNum=0; for (i=0; i<positionSize; i++) { (position[i] % 2)? oddNum++: evenNum++; } return (oddNum < evenNum)? oddNum: evenNum; }