static boolean isSubstringPresent(String substring, String string) {
        boolean found = false;
        int max = string.length() - substring.length();
        if(max < 0 ) return found;

        boolean[] res = new boolean[max + 1];
        for (int i = 0; i <= max; i++) {
            int length = substring.length();
            int j = i;
            int k = 0;
            while (length-- != 0) {
                if (string.charAt(j++) == substring.charAt(k++)) {
                    res[i] = true;
                }
                else res[i] = false;
            }

        }
        for(int i = 0; i < res.length; i++) {
            if(res[i] == true) found = true;
        }
        return found;
    }
}