LeetCode-521 Longest Uncommon Subsequence I Solution (with Java)

1. Description:

Notes:

2. Examples:

3.Solutions:

1 class Solution {
2     public int findLUSlength(String a, String b) {
3         return a.equals(b) ? -1 : Math.max(a.length(), b.length());
4     }
5 }

 

posted @ 2020-03-02 16:37  SheepCore  阅读(91)  评论(0编辑  收藏  举报