can you please explain why we initialize dp[i]=1;
i am unable to understand, please explain me in brief
Not understand the line
The minimum value of longest increasing subsequence can be 1. ie. but taking the character at ith posn only.
So dp array is initialized with 1