Understand the time complexity for this LCS (longest common subsequence) solution
I assume you are interested in worst-case complexity.

A dynamic programming approach (recursively) breaks a problem into "smaller" problems,
and records the solution of these subproblems to make sure 
that subproblems are not computed several times. So when the time required to combine subproblems is constant (it is the case for LCS), you only have to find an upper bound for the number of possible subproblems that will be solved along the program.


Here the subproblems are of the form 
findLCS(s1,s2) where s1 is a prefix of str1, and s2 a prefix of str2.
There are (1+str1.length()) possible prefixes for str1, and 
(1+str2.length()) for str2. 
The number of possible subproblems is therefore (1+str1.length()) * (1+str2.length()).
Furthermore, a solution is obtained in constant time from its subproblems.
Hence complexity O( str1.length()*str2.length() ).


N.B. on some sequences all subproblems will be indeed computed, e.g., when letters in str1 and str2 are distinct.
Consequently, the quadratic bound is "tight".

N.B.2 you may find (short) explanations on the wikipedia page for LCS