public int numDecodings(String s) {
	   if(s.length() == 0) return 0;
	   int[] num = new int[s.length()];
	 
	   if(s.charAt(0)>'0') 
		   num[0]=1;
	   else 
		   num[0]=0;
	   
	   for(int i=1; i<s.length(); i++)
	   {
		   int path1 = 0, path2=0;
		   
		   if(s.charAt(i)>'0') path1 = num[i-1];
		   
		   if((s.charAt(i)<='6' && s.charAt(i-1)=='2' ) || s.charAt(i-1)=='1')
		   {
		       if(i==1)
		        path2 = 1;
		       else
			    path2 = num[i-2];
		   }
		   num[i] = path1+path2;
	   }
       
	   return num[s.length()-1];
   }