Hi All,
int maxLength = Math.min(s1.length(), s2.length());
Integer[][][] dp = new Integer[s1.length()][s2.length()][maxLength];
My analysis is that since we have a 3d array the running time will be bounded by
O(mn(min(m,n)))
where m is s1 length and n is s2 length
Please do correct me if I am mistaken
Thanks