public boolean isMatch(String s, String p) {
        int sizep = p.length();
    	int sizes = s.length();
    	
    	if(sizep ==0) return sizes==0;
    	
    	if(sizes ==0)
    	{
    		if(p.charAt(0)=='*')
    			return isMatch(s, p.substring(1));
    		else 
    			return false;
    	}else
    	{
    		if(p.charAt(0)=='?'|| p.charAt(0) == s.charAt(0)) 
	    	{
	    		return isMatch(s.substring(1), p.substring(1));
	   		}else if(p.charAt(0)=='*')
	   		{
	   			while(p.length()>1 && p.charAt(1)=='*')
	   			{
	   				p=p.substring(1);
	   			}
	   			return isMatch(s, p.substring(1)) || isMatch(s.substring(1), p);
	   		}else
	   			return false;
    	}
    	


    }