Wrong editorial solution and test cases


#1

njqeeosasrtcawhspirwsbgg should return 13 not 23,

public class Solution {
        public int solve(String s) 
        {
             int n = s.length();
            int[][] dp = new int[n][n];
            char[] arr = s.toCharArray();
            for(int i=1; i<=n; i++)
            {
                for(int j=0; j<n-i; j++)
                {
                   
                    if(arr[j] == arr[i+j])
                    {
                        dp[j][i+j] = dp[j+1][i+j-1];
                    }
                    else
                    {
                        dp[j][i+j] = 1+ Math.max(dp[j][i+j-1],dp[j+1][i+j]);
                    }
                }
            }
            return dp[0][n-1];
        }
    }

#2

I completely agree…wrong test cases
It is a simple question in which you need to find LPS(Longest Palindromic Substring)
and return String.length()-LPS


#3

23 is the correct answer for this. Think again! (read the question again).