private static int findMinOperations(char[] chars) {

        if (chars.length < 1 || chars.length > 100) {
            return -1;
        }

        int upperCase = 0;
        int lowerCase = 0;
        for (char c : chars) {
            if (isLowerCase(c))
                lowerCase++;
            else if (isUppercase(c))
                upperCase++;
        }


        if (upperCase == 0 && lowerCase == 0) {
            return -1;
        }
        if (upperCase > lowerCase) {
            return lowerCase;
        } else
            return upperCase;

    }