longest common subsequence in Java