boolean scrambleHelper(int is, int js, int l) {

        if (!setMatch(is, js, l))
            return false;

        if (l == 1)
            return true;

        for (int cut = 1; cut < l; cut++) {
            boolean valid;
            valid = scrambleHelper(is, js, cut)
                    && scrambleHelper(is + cut, js + cut, l - cut);

            valid = valid ||
                    (scrambleHelper(is, js + l - cut, cut)
                    && scrambleHelper(is + cut, js, l - cut));

            if (valid)
                return true;
        }

        return false;
    }