Amazon Interview Question

Given two strings text1 and text2, return the length of their longest common subsequence.