easy JAVA Solution✅|| DP🔥|| Memoization🔥
1st Method(Memoization)\n\nclass Solution {\n    public boolean isMatch(String s, String p) {\n        int dp[][]=new int[s.length()][p.length()];\n        for(
# 1st Method(Memoization)\n```\nclass Solution {\n    public boolean isMatch(String s, String p) {\n        int dp[][]=new int[s.length()][p.length()];\n        for(int a[]:dp) Arrays.fill(a,-1);\n        return sol(s,p,s.length()-1,p.length()-1,dp);\n    }\n    public boolean sol(String s,String p,int m,int n,int[][] dp){\n        if(m<0){\n            for(int i=0;i<=n;i++) if(p.charAt(i)!=\'*\') return false;\n            return true;\n        }\n        if(n<0) return false;\n        if(dp[m][n]!=-1) return dp[m][n]==1;\n        boolean ans=false;\n        if(s.charAt(m)==p.charAt(n) || p.charAt(n)==\'?\') ans=sol(s,p,m-1,n-1,dp);\n        if(p.charAt(n)==\'*\') ans=sol(s,p,m-1,n,dp) || sol(s,p,m,n-1,dp);\n        if(ans) dp[m][n]=1;\n        else dp[m][n]=0;\n        return dp[m][n]==1;\n    }\n}\n```\n# 2nd Method(DP)\n```\nclass Solution {\n    public boolean isMatch(String s, String p) {\n        boolean dp[][]=new boolean[s.length()+1][p.length()+1];\n        dp[0][0]=true;\n        for(int i=1;i<=p.length();i++){\n            if(p.charAt(i-1)!=\'*\') break;\n            dp[0][i]=true;\n        }\n        for(int i=1;i<=s.length();i++){\n            for(int j=1;j<=p.length();j++){\n                if(s.charAt(i-1)==p.charAt(j-1) || p.charAt(j-1)==\'?\'){\n                    dp[i][j]=dp[i-1][j-1];\n                }else if(p.charAt(j-1)==\'*\'){\n                    dp[i][j]=(dp[i-1][j] || dp[i][j-1]);\n                }\n            }\n        }\n        return dp[s.length()][p.length()];\n    }\n}\n```
['Dynamic Programming', 'Memoization', 'Java']