public static int numDistinct(String s, String t) {
        if (s == null || t == null || 
            s.length() == 0 || t.length() == 0 || s.length() < t.length()) {
            return 0;
        }
        char[] s_char = s.toCharArray();
        char[] t_char = t.toCharArray();
        return numDistinctHelper(s_char, 0, t_char, 0);
    }