Pergunta de entrevista da empresa Amazon

The first question was standard Longest Common Subsequence, interviewers expected me to first explain the brute force solution and then move on to the optimal approach.