Longest Common subsequence doubt

Why did we take max(dp[i][j-1],dp[i-1][j])?Why only those two values(dp[i][j-1],dp[i-1][]j)?Please explain with example !!!

hey @sibyt911, Please consider this explanation.


If you even not able to understand I will suggest you to go through this video https://youtu.be/sQppNtIxoc0

ohh now it’s clear thanks for the explanation