public int calculateRecursive(char str[],int start,int len){
        if(len == 1){
            return 1;
        }
        if(len ==0){
            return 0;
        }
        if(str[start] == str[start+len-1]){
            return 2 + calculateRecursive(str,start+1,len-2);
        }else{
            return Math.max(calculateRecursive(str, start+1, len-1), calculateRecursive(str, start, len-1));
        }
    }
Date 08/01/2014
@author Tushar Roy

Given a string find longest palindromic subsequence in this string.

Time complexity - O(n2)
Space complexity - O(n2

Youtube link - https://youtu.be/_nCsPn7_OgI

References
http://www.geeksforgeeks.org/dynamic-programming-set-12-longest-palindromic-subsequence/
src/com/interview/dynamic/LongestPalindromicSubsequence.java